因此,对于我的create_data.php文件,我收到一条错误说明:注意:未定义的变量:第92行的C:\ xampp \ htdocs \ create_data.php中的firstNames,但对于lastNames,dob,email等。我感觉好像我已经做完了所有提及变量的事情,但是我想念的是什么?我该如何解决这个问题,以便可以在xampp文件上创建数据。
此错误的我的create_data文件代码为:
// create the SQL query to be executed
$sql = "INSERT INTO users (username, password, firstName, lastName, email, dob, telephone)
VALUES ('$usernames[$i]', '$passwords[$i]', '$firstNames[$i]', '$lastNames[$i]', '$emails[$i]',
'$dobs[$i]', '$telephone[$i]')";
$usernames = $passwords = $firstNames = $lastNames = $emails = $dobs = $telephone =array();