joecooper Posted April 18, 2012 Share Posted April 18, 2012 Hi, I have got a working HTMLarea input form. And using a form, it will input the data from the HTMLarea into a mysql database table. But, the formatting breaks the MySQL query. How can I parse the information so this wouldnt happen? The exact error is: 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 ' content in: [iNSERT into zen_blog (id, content, active) VALUES ('', content , )!] If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields. Link to comment https://forums.phpfreaks.com/topic/261182-format-html-for-mysql-insert/ Share on other sites More sharing options...
batwimp Posted April 18, 2012 Share Posted April 18, 2012 Could you post the actual code? Link to comment https://forums.phpfreaks.com/topic/261182-format-html-for-mysql-insert/#findComment-1338517 Share on other sites More sharing options...
Maq Posted April 18, 2012 Share Posted April 18, 2012 Yes we need to see the actual code. It looks like your query starts out: INSERT into zen_blog (id, content, active) VALUES ('',content, Assuming "content" is a variable then you're missing the '$', if not, then you need quotes around it. Link to comment https://forums.phpfreaks.com/topic/261182-format-html-for-mysql-insert/#findComment-1338536 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.