Dubird 6,815 Report post Posted September 2, 2010 I have an error I can't find and it's driving me nuts. Everything looks right, but it keeps saying I have a syntex error. Here's the code: $query = "INSERT INTO toys (name, cat, subcat, producer, license, location, year, size, price, paid, from, image, about) VALUES ('$name', '$cat', '$subcat', '$producer', '$license', '$location', '$year', '$size', '$price', '$paid', '$from', '$image', '$about')"; $result = @mysql_query($query) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $query . "<br />\nError: (" . mysql_errno() . ") " . mysql_error()); And here's the query it comes up with (which, the post is doing it's job and putting the right words in the right places) Query: INSERT INTO toys (name, cat, subcat, producer, license, location, year, size, price, paid, from, image, about) VALUES ('test2', 'calendar', '', 'fdasf', 'adsf', 'afds', '1234', 'fdasf', 'fdsadf', 'fdsaf', 'fdasfda', 'test2', 'fdsafa') And here's the error: Error: (1064) 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 'from, image, about) VALUES ('test2', 'calendar', '', 'fdasf', 'adsf', 'afds', '1' at line 1 help? *great big puppy dog eyes* Quote Yesterday was the deadline for all complaints! Share this post Link to post Share on other sites
gokuDX7 2,871 Report post Posted October 7, 2010 "from" is a mysql reserved keyword. Try changing it to ffrom or something. Quote All hail piggy, king of bacon ^)^ Share this post Link to post Share on other sites