SUNIL16 Posted January 24, 2009 Share Posted January 24, 2009 Hi Friends, I am developing one question and answer form? i given data types like this while creating tables. `question` varchar(255) NOT NULL default'0', `answer` longtext NOT NULL, Now if i send a answer with single cote (') its giving error. What may be the reason i am not getting. eg. if i send as sunil's the form will not submit but it gives error. Link to comment https://forums.phpfreaks.com/topic/142265-error-while-submitting-form/ Share on other sites More sharing options...
MadTechie Posted January 24, 2009 Share Posted January 24, 2009 your need to use addslashes() or better still mysql_real_escape_string() if you post you code with the "INSERT INTO" i could give you a actual example Link to comment https://forums.phpfreaks.com/topic/142265-error-while-submitting-form/#findComment-745305 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.