IreneLing Posted October 23, 2011 Share Posted October 23, 2011 Hi all. When I typed symbol ' in my textarea , after I submit it and view for what I typed , it will automatically add a slash in front of the ' . Such as the message is "I'm fine" , then it will turn out as "I\'m fine". Can I know what is the problem ? and how can I solve it? Thanks for every reply . Quote Link to comment Share on other sites More sharing options...
IreneLing Posted October 23, 2011 Author Share Posted October 23, 2011 Ah...I found the solution....using stripslashes(). and because I have have magic quotes enabled. Quote Link to comment Share on other sites More sharing options...
xyph Posted October 23, 2011 Share Posted October 23, 2011 These should be turned off - let your server know magic quotes have been depreciated. http://www.php.net/manual/en/security.magicquotes.disabling.php To write portable code that checks if it should be stripped of slashes, read here http://stackoverflow.com/questions/1153741/how-can-i-disable-php-magic-quotes-at-runtime Quote Link to comment Share on other sites More sharing options...
IreneLing Posted October 23, 2011 Author Share Posted October 23, 2011 Thank you so much for the links xyph , I'm just wondering how to turn it off before I start google it . Thanks again and wish you have a nice day . PS: Thanks for the link in your signature too , my coding have major sql injection problem now and gotta solve it. Quote Link to comment Share on other sites More sharing options...
xyph Posted October 23, 2011 Share Posted October 23, 2011 That's why it's there Happy to help. 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.