I have a HTML form. After submit the form it's show following error message:
Error Message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near 'm ok. ', 'point of interest',
'91354857', '6546564654', '2 Person', '25', 'engl' at line 1
Mysql Query:
$insert = mysql_query("INSERT INTO host_signup VALUES('', '$uname', '$f_name',
'$pr_lname', '$email', '$hashpass', '$title', '$country', '$city', '$state',
'$postalcode', '$address', '$final_neighbor', '$landline', '$mobileph', '$capacity',
'$age', '$language', '$final_interest', '$news', '$ip', '$dof', '0' )");
Actually it's show the error message when I put stripslashes()
in the variable But without stripslashes()
it's show backslashes.
For example:
$address = $_POST['address'];
$address = stripslashes($address);