mainly used php and mysql. I'm a beginner.
What I'm trying to do is register the user in my database in order to save the form input in my user_tb.
get this error when I try to paste the values ββinto the form:
"The number of columns does not match the number of values ββin row 1"
I thought this was because I did not insert the value of user_id (which is an automatic increment), so I tried to insert '' into my query for user_id, but still no luck.
here is the request:
$query = "INSERT INTO users_tb (user_id, user_status, user_gender, user_firstname, user_surname, student_number, user_email, user_dob, user_name, user_pass) VALUES('','$status','$gender','$firstname','$surname','$hnumber','$dob','$username','$password')"; mysql_query($query) or die(mysql_error()); mysql_close();
will it help. If you need any other code, just say it.
to make sure the inserts should not be in the same order as the fields in the table?
many thanks,
php mysql
buymypies
source share