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. Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/142265-error-while-submitting-form/#findComment-745305 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.