Aravinthan Posted August 19, 2009 Share Posted August 19, 2009 Hi, I have a little problem. I am fetching data from MYSQL database, with the fied name, Name. Ok so the thing is some of the name have single quotes in them. SO when I want to pass it via $GET to another page, it doesnt show the full name... The other page, takes the value and prints information for that name... I tried addslahses, without any help... Is there a word-around? Thanks for your help, Ara Link to comment https://forums.phpfreaks.com/topic/171039-solved-escpaing-charcters/ Share on other sites More sharing options...
Monadoxin Posted August 19, 2009 Share Posted August 19, 2009 Hi, I have a little problem. I am fetching data from MYSQL database, with the fied name, Name. Ok so the thing is some of the name have single quotes in them. SO when I want to pass it via $GET to another page, it doesnt show the full name... The other page, takes the value and prints information for that name... I tried addslahses, without any help... Is there a word-around? Thanks for your help, Ara Have you tried urlencode for the value you send via GET? Link to comment https://forums.phpfreaks.com/topic/171039-solved-escpaing-charcters/#findComment-902092 Share on other sites More sharing options...
Aravinthan Posted August 19, 2009 Author Share Posted August 19, 2009 Of course! Thanks Link to comment https://forums.phpfreaks.com/topic/171039-solved-escpaing-charcters/#findComment-902099 Share on other sites More sharing options...
Aravinthan Posted August 19, 2009 Author Share Posted August 19, 2009 Hi, OK so I dont get the problem. The link says: name=Ryan%20O%27Reilly And %20 = Space %27 = single quote... So far so good right no? Well not quite, I put it in a variable: $player = $_GET['name']; And when I echo it out: Ryan O\'Reilly Where did that slash comes from? In the link, there is no slash.... Thanks for your help, Ara Link to comment https://forums.phpfreaks.com/topic/171039-solved-escpaing-charcters/#findComment-902160 Share on other sites More sharing options...
Monadoxin Posted August 19, 2009 Share Posted August 19, 2009 http://us.php.net/manual/en/function.urldecode.php Link to comment https://forums.phpfreaks.com/topic/171039-solved-escpaing-charcters/#findComment-902167 Share on other sites More sharing options...
ldb358 Posted August 19, 2009 Share Posted August 19, 2009 did you say that you where esacping it? if the get_magic_quotes_gpc is on, on your server it will automaticly slash every thing so make sure to use stripslashes before escaping Link to comment https://forums.phpfreaks.com/topic/171039-solved-escpaing-charcters/#findComment-902183 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.