patheticsam Posted May 4, 2009 Share Posted May 4, 2009 Hi! I just have a simple question. Il have an HTML form with a <textarea></textarea>.....When the form is processed I have a SQL command to INSERT the <textarea> value......My only concern is when someone enters a ' (single quote) ex : don't... I come up with an SQL error.....Is there anyway I can tell SQL to insert every characters containted in the textarea value? I'm not very good with PHP so that's the reason I'm asking..... If you need to see my code just ask! Thanks in advance.... Link to comment https://forums.phpfreaks.com/topic/156722-solved-little-questions-with-forminsert-and-single-quotes/ Share on other sites More sharing options...
Ken2k7 Posted May 4, 2009 Share Posted May 4, 2009 Use mysql_real_escape_string(). You should use that for all SQL entries to prevent SQL injection. Link to comment https://forums.phpfreaks.com/topic/156722-solved-little-questions-with-forminsert-and-single-quotes/#findComment-825251 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.