Monkuar Posted December 13, 2011 Share Posted December 13, 2011 My code here setcookie('hide_div', $_COOKIE['hide_div'].','.$_GET['hide'],time()+32000000); When I set it, it works wonderful, but then when I see view it in my cookie it shows this code between my $_GET['hide'] values %2C how do I clean it up and just make it show my " , "? Thank you Link to comment https://forums.phpfreaks.com/topic/253045-need-to-clean-my-cookie/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 13, 2011 Share Posted December 13, 2011 Where are you looking at to see the %2C value, because it should be decoded for you when php populates the $_COOKIE variable - Note that the value portion of the cookie will automatically be urlencoded when you send the cookie, and when it is received, it is automatically decoded... Link to comment https://forums.phpfreaks.com/topic/253045-need-to-clean-my-cookie/#findComment-1297349 Share on other sites More sharing options...
Monkuar Posted December 13, 2011 Author Share Posted December 13, 2011 Where are you looking at to see the %2C value, because it should be decoded for you when php populates the $_COOKIE variable - Note that the value portion of the cookie will automatically be urlencoded when you send the cookie, and when it is received, it is automatically decoded... I clicked it 3 times, so it ad's my $_GET['hide'] 3 times, which should be 3,3,3? No idea why it's not working Other websites, it is shown 3,3,3 too. why Can't I get mine like that? Easier to explode. Link to comment https://forums.phpfreaks.com/topic/253045-need-to-clean-my-cookie/#findComment-1297350 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.