atticus Posted February 27, 2008 Share Posted February 27, 2008 When I insert data into mysql from a form, I keep getting this problem when the data is displayed "we're" is turned into "we/'re". I am inserting the data into a varchar type field. Quote Link to comment Share on other sites More sharing options...
p2grace Posted February 27, 2008 Share Posted February 27, 2008 It's supposed to do that. It keeps mysql safe from hack attempts and sql injection. Quote Link to comment Share on other sites More sharing options...
atticus Posted February 27, 2008 Author Share Posted February 27, 2008 how can I drop it out when I display information back on the website to the user? Quote Link to comment Share on other sites More sharing options...
p2grace Posted February 27, 2008 Share Posted February 27, 2008 You can use the stripslashes() command. http://us3.php.net/manual/en/function.stripslashes.php Quote Link to comment Share on other sites More sharing options...
Neptunus Maris Posted February 27, 2008 Share Posted February 27, 2008 Yeah first use mysql_real_escape_string() to insert the data then use stripslashes() to display that data... Quote Link to comment Share on other sites More sharing options...
atticus Posted February 27, 2008 Author Share Posted February 27, 2008 thanks ya'll, problem solved 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.