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? Quote 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? Quote 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 Quote 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 Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.