私はこの問題を解決しようとしています。長いフォームがあり、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.";}