syntrax Posted May 10, 2010 Share Posted May 10, 2010 ok, so I have a form, where users type their info and then the text is send to a mysql DB. I'm using 'htmlspecialchars' to filterout the special characters, but it seems that that thing won't filter out the apostrophe ( ' ), the upper comma thing. b/c every setence that has that, i get a mysql error. thx in advance for ur help Link to comment https://forums.phpfreaks.com/topic/201214-help-with-special-characters/ Share on other sites More sharing options...
kenrbnsn Posted May 10, 2010 Share Posted May 10, 2010 When putting data into a MySQL database you should be using mysql_real_escape_string, not htmlspecialchars. The htmlspecialchars() function is mainly used for displaying strings. Ken Link to comment https://forums.phpfreaks.com/topic/201214-help-with-special-characters/#findComment-1055642 Share on other sites More sharing options...
syntrax Posted May 10, 2010 Author Share Posted May 10, 2010 cooll!!!! ty very much, i didn't know that. Link to comment https://forums.phpfreaks.com/topic/201214-help-with-special-characters/#findComment-1055645 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.