$query = "INSERT INTO personal_details ( first_name, last_name,password, email_id, password,
gender,blood_group,mobile_number,AgeGroupIndex )
VALUES ( '$fname','$lname', '$password', '$email', '$gender','$blood_group',
'$mobile','$birthdate','$AgeGroup' )";
mysql_query($query);
数据未插入其中。有人可以排除故障吗?
答案 0 :(得分:1)
您在“电子邮件”后复制“密码”。 另外,“生日”是错误的
$query = "INSERT INTO personal_details
(first_name,last_name,password,email_id,gender,blood_group,mobile_number,AgeGroupIndex ) VALUES ( '$fname','$lname','$password','$email','$gender','$blood_group','$mobile','$AgeGroup' )";
mysql_query($query);
更新
在评论中提及 Hek mat 时,您应该使用预备语句
http://www.w3schools.com/php/php_mysql_prepared_statements.asp