etrader Posted July 25, 2011 Share Posted July 25, 2011 I insert into mysql table by a simple form. The problem is that I get error when my text contains (') or ("). Dow I need to put a \ before them by php before inserting into mysql or there's another trick to skip (') and (") when storing and calling text into/from mysql database? Link to comment https://forums.phpfreaks.com/topic/242740-how-to-skip-and-in-mysql/ Share on other sites More sharing options...
Muddy_Funster Posted July 25, 2011 Share Posted July 25, 2011 I take it your not using mysql_real_escape_string() on your form inputs then? Link to comment https://forums.phpfreaks.com/topic/242740-how-to-skip-and-in-mysql/#findComment-1246744 Share on other sites More sharing options...
AyKay47 Posted July 25, 2011 Share Posted July 25, 2011 yes as the poster before me said, look into using mysql_real_escape_string before inserting data into your db table Link to comment https://forums.phpfreaks.com/topic/242740-how-to-skip-and-in-mysql/#findComment-1246750 Share on other sites More sharing options...
etrader Posted July 25, 2011 Author Share Posted July 25, 2011 Thanks folks, this was exactly what I missed Link to comment https://forums.phpfreaks.com/topic/242740-how-to-skip-and-in-mysql/#findComment-1246775 Share on other sites More sharing options...
Muddy_Funster Posted July 25, 2011 Share Posted July 25, 2011 no worries Link to comment https://forums.phpfreaks.com/topic/242740-how-to-skip-and-in-mysql/#findComment-1246776 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.