Forum Moderators: coopster
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
This is the sql I used:
$sql = "INSERT INTO visitTable (custID, desc, date, formula, product1, product2, product3, product4, product5, product6, product7, product8, product9, product10) VALUES ('$clientID', '$desc', '$todaysDate', '$Formula', '$product1', '$product2', '$product3', '$product4', '$product5', '$product6', '$product7', '$product8', '$product9', '$product10')";
this is what the string looks like when I echo it:
INSERT INTO visitTable (desc, date, formula, product1, product2, product3, product4, product5, product6, product7, product8, product9, product10) VALUES ('tewt', '9/27/2009', 'test', '450', 'NULL', 'NULL', 'NULL', 'NULL', 'NULL', 'NULL', 'NULL', 'NULL', 'NULL')
desc, date,
This is probably the problem. You cannot use reserved words without escaping them. You must escape them for it to work properly...
`desc`, `date`,
Try surround them with the prime character and try again. :)
'".$clientID."' would probably be faster...
[webmasterworld.com...]