No data inserted into database. Am I wrongdoing it?
I have a form named:"RegistrationForm.php". when i click the "submit button", there's a data inserted in the database (the prove is, there a new row in the database),
but there's no value from user textfield(ic_no,name,email...) that have been inserted.
It means like there's a row of data inserted but without value..
p/s- however, when i click the submit button, it successfully directed me to the "BookingForm.php" with all the session value...it's just that there's no data inserted into the database.
can someone straighten this up for me? am i doing wrong with the coding with the submit button?
here's the code
For the luv of gawd, please don't forget to verify your data before you enter it into a database. At the very VERY least you should be sanitizing it with mysql_real_escape_string();
You're attempting to insert a row using POST information that isn't populated at the time of the statement. When the form submits (to BookingForm.php) you should be checking on that page for valid POST data. If none is found send them back to the form, if it is found, checked for validity and passes, then insert your sanitized input into the database.
The Following User Says Thank You to delayedinsanity For This Useful Post: