I am getting this error on my results page for a form:
Error: 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 'references, insurance, namedate) VALUES (‘test’,‘test’,‘test’,'t
This is my code:
<?php
$con = mysql_connect("mysql","*****","*****");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("dasher", $con);$sql="INSERT INTO vendor (cname, maddress, paddress, supplies, bphone, cphone, fax, email, conname, capacity, contactcellphone, statetax, fedtax, ssn, lengthbusiness, license, residence, references, insurance, namedate)
VALUES
('$_POST[cname]','$_POST[maddress]','$_POST[paddress]','$_POST[supplies]','$_POST[bphone]','$_POST[cphone]','$_POST[fax]','$_POST[email]','$_POST[conname]','$_POST[capacity]','$_POST[contactcellphone]','$_POST[statetax]','$_POST[fedtax]','$_POST[ssn]','$_POST[lengthbusiness]','$_POST[license]','$_POST[residence]','$_POST[references]','$_POST[insurance]','$_POST[namedate]')";if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "Your application is being reviewed.";mysql_close($con)
?>
I’m not seeing any problems. Am I missing something?
Thanks!