I'm trying to use a form to insert values into a mysql table when a user registers. Originally every column in my table was getting populated by a value from the form, so my code was this:
mysql_query("INSERT INTO register VALUES ('$FirstName', '$LastName', '$EmailAddress', '$Username','$Password', '$Gender', '$Day', '$Month', '$Year', '$Postcode', '$Comments', '$Newsletter')");
and this worked.
I then decided that I wanted to create an ID field in my table (which is the column before FirstName.
My code is now this:
mysql_query("INSERT INTO register (FirstName, LastName, EmailAddress, Username, Password, Gender, Day, Month, Year, Postcode, Comments, Newsletter) VALUES ('$FirstName', '$LastName', '$EmailAddress', '$Username','$Password', '$Gender', '$Day', '$Month', '$Year', '$Postcode', '$Comments', '$Newsletter')");
The ID field is on auto increment. But now I can't get anything to feed into the table.
I think I'm just missing out something really stupid but I've been looking at it for ages and can't for the life of me see where I'm going wrong!
:queasy: