mattheww Posted December 18, 2009 Share Posted December 18, 2009 Basically I have a text area, a query to send the data to the table, etc, etc... but the problem is, MySQL won't allow certain characters, for example the Apostrophe. I know this stops people doing MySQL injection, but how do I get it so PHP or MySQL replaces the character for something else, and then converts it back when I query it? Link to comment https://forums.phpfreaks.com/topic/185658-how-do-i-get-mysql-to-allow-all-characters/ Share on other sites More sharing options...
premiso Posted December 19, 2009 Share Posted December 19, 2009 You want to look into mysql_real_escape_string onto data going into the database will do what you want and you do not have to worry about changing anything or modifying data when pulling it out. Link to comment https://forums.phpfreaks.com/topic/185658-how-do-i-get-mysql-to-allow-all-characters/#findComment-980336 Share on other sites More sharing options...
trq Posted December 19, 2009 Share Posted December 19, 2009 mysql_real_escape_string should be used on all variables used within queries. Link to comment https://forums.phpfreaks.com/topic/185658-how-do-i-get-mysql-to-allow-all-characters/#findComment-980337 Share on other sites More sharing options...
mattheww Posted December 19, 2009 Author Share Posted December 19, 2009 Thanks guys, that helped! Link to comment https://forums.phpfreaks.com/topic/185658-how-do-i-get-mysql-to-allow-all-characters/#findComment-980343 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.