Hi Guys,
When I try to enter the name " O'Malley " into a field for input into a form, I receive the following error when I try to insert it into my database table.
I believe it is because of the " ' " character. However, I'm not sure how to make it work as I'm sure my clients will be using the " ' " with their names.
Any thoughts?
Thanks,
Gary
Can't connect because 003
You have an error in your SQL syntax near 'Malley', '2121 Main Street', 'Suiet B', 'Rockford', 'KY', '87878', 'client2@tnev' at line 1
if ($checkbox1 == "ON") {
$clientstatus = "inactive";
$query = "INSERT INTO clients VALUES ('', '$homeownerfirstname1', '$homeownerlastname1', '$homeowner1address1', '$homeowner1address2', '$homeownercity1', '$homeownerstate1', '$homeownerzipcode1', '$homeowneremailaddress1', '$clientmessage1', '$clientstatus', '$clientsignupdate', '$datejulian', '$agentid')";
mysql_query($query) or die ("Can't connect because 003".mysql_error());
$client_id_1 = mysql_insert_id(); }