nemesis.2002 Posted November 6, 2008 Share Posted November 6, 2008 So I've made this php back end for a french website on my server everything works great but on the client's server when ever he updates it adds backslashes behind quotation marks. So let's say he writes (L'amour) it'll show up in the database like this (L\'amour) is their a way to fix this? Quote Link to comment Share on other sites More sharing options...
Mr.Shawn Posted November 6, 2008 Share Posted November 6, 2008 Hopefully this helps. stripslashes($str); Quote Link to comment Share on other sites More sharing options...
nemesis.2002 Posted November 6, 2008 Author Share Posted November 6, 2008 stripslashes($str); Is $str what i', retrieving from the database or what I'm sending? Quote Link to comment Share on other sites More sharing options...
MatthewJ Posted November 6, 2008 Share Posted November 6, 2008 retrieving... So <?php echo stripslashes($row['output']); ?> Quote Link to comment Share on other sites More sharing options...
trq Posted November 6, 2008 Share Posted November 6, 2008 The problem is actually to do with how the data is being escaped when entering the database. Obviosuly its being escaped twice because the actual slashes should not be stored within the db and there shouldn't be any need to use stripslashes when retrieving results. Have you got magic quotes enabled? And if so, are you escaping the data again before inserting into the database? Quote Link to comment Share on other sites More sharing options...
Imad Posted November 6, 2008 Share Posted November 6, 2008 As Thorpe said, make sure that the data is escaped before entering the database as they're not suppose to be stored with the actual data. Best Regards. Quote Link to comment 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.