我正在尝试最后一个小时解决这个问题。我有一个很长的表格,我正在尝试将信息上传到 mysql 数据库中。放到我做的桌子上。这是我正在使用的 mysql 查询:
mysql_query("INSERT INTO `users_temp`(`first_name`, `surname`, `birthday`, `nationality`, `email`, `mobile`, `landline`, `address`, `town`, `post_code`, `country`, `password`, `code_conf`) VALUES ([$f_name],[$s_name],[$bday],[$nationality],[$email],[$mobile],[$landline],[$address],[$town],[$post_code],[$country],[$pass],[$conf_code])");
如果有人看到任何问题为什么它不起作用,请告诉我。谢谢...
$f_name = $_POST["f_name"];
$s_name = $_POST["s_name"];
$pass = $_POST["pass"];
$birthday = $_POST["bday"];
$nationality = $_POST["nationality"];
$email = $_POST["email"];
$mobile = $_POST["mobile"];
$landline = $_POST["landline"];
$address = $_POST["address"];
$town = $_POST["town"];
$post_code = $_POST["post_code"];
$country = $_POST["country"];
$conf_code = substr(md5(uniqid(rand(), true)), 1, 70);
include("connect_into_mysql.php");
mysql_select_db("jzperson_edu", $conn);
$res_01 = mysql_query("SELECT * FROM users WHERE email='$email'");
$count_01 = mysql_num_rows($res_01);
if($count_01==0)
{
mysql_query("INSERT INTO users_temp ('first_name','surname','birthday','nationality','email','mobile','landline','address','town','post_code','country','password','code_conf') VALUES ('$f_name','$s_name','$bday','$nationality','$email','$mobile','$landline','$address','$town','$post_code','$country','$pass','$conf_code')");
header("Location: home.php");
}else{echo "This email is already registered. If you lost your password you can reset it here.";}