I am using mysql and PHP.
The user are asked to input txt in textbox. I saved the string in mysql table, using mysql_real_escape_string($mystring). When I checked it in db, it has “prepended” \ whenever there is ‘ . Users are also allowed to edit the text, so I need to display the text in a html textarea. How do I skip the \ ? mysql_real_escape_string doesn’t seem to work. Thank you in advance.
I am using mysql and PHP. The user are asked to input txt in
Share
sounds like
magic_quotes_gpcmight be turned on in your config. Check your php.ini file for this setting.If you don’t have access to
php.ini, you can modify this setting in a .htaccess file:When it comes to updating the existing value, try using
htmlentitiesto escape the funny characters.