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 . Link to comment https://forums.phpfreaks.com/topic/249656-problem-with-and/ 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. Link to comment https://forums.phpfreaks.com/topic/249656-problem-with-and/#findComment-1281600 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 Link to comment https://forums.phpfreaks.com/topic/249656-problem-with-and/#findComment-1281602 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. Link to comment https://forums.phpfreaks.com/topic/249656-problem-with-and/#findComment-1281606 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. Link to comment https://forums.phpfreaks.com/topic/249656-problem-with-and/#findComment-1281636 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.