godrob Posted March 3, 2011 Share Posted March 3, 2011 Hi guys, I wonder if somebody can help me? When a user enters details about themselves into a textbox and includes an apostrophe, when the profile is pulled from the MYSQL database the apostrophe is replaced with a \' How can I get it so when the profile is viewed there is either no backslash Thanks for any help Regards Rob Quote Link to comment https://forums.phpfreaks.com/topic/229493-apostrophe-help-please/ Share on other sites More sharing options...
Muddy_Funster Posted March 3, 2011 Share Posted March 3, 2011 look up stripslashes() in the php manual. Quote Link to comment https://forums.phpfreaks.com/topic/229493-apostrophe-help-please/#findComment-1182391 Share on other sites More sharing options...
Pikachu2000 Posted March 3, 2011 Share Posted March 3, 2011 If data is coming out of the database with backslashes escaping quotes, the problem is most likely occurring when the data is being inserted into the database to begin with. Is magic_quotes_gpc() on in your php.ini file by chance? Quote Link to comment https://forums.phpfreaks.com/topic/229493-apostrophe-help-please/#findComment-1182394 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.