How do i remove this error in my sql syntax?

  • Answered
i connect my form using php with xampp database,i connect 3 forms to my database table,while connecting the forth form,i have gota an error i-e 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 'a45670','','on','on')' at line 1. the code which i was written to connect my form to my database table is what should i do to remove this error?
Hello, The error message tells you where the query is failing. This appears to be somewhere in the VALUES section, perhaps &value7 or &value8. Be sure to check our article on the MySQL 1064 error for the different causes of this type of error. My guess is that it is trying to insert a string into a numeric field or something of that nature. You may also want to echo out the entire query so you can get a better understanding and see the entire thing as you troubleshoot and match the tables, columns, and value types against the database. Kindest Regards, Scott M
Your syntax looks fine, but be sure that each of the tables and fields that you are inserting data into exist as well as the variables that you are expecting are returning the correct data. You can do so by using PHPMyAdmin to check over the tables and fields, as wells as the PHP echo command to display your variables.