c_pattle Posted December 14, 2010 Share Posted December 14, 2010 Just a small question really. If you use "urlencode()" for example if I am using a GET. Should I then do urldecode where a script then uses the GET variable? Link to comment https://forums.phpfreaks.com/topic/221625-urlencodeurldecode/ Share on other sites More sharing options...
c_pattle Posted December 14, 2010 Author Share Posted December 14, 2010 For example if I have this code on one page <a href=\"index.php?name=" . urlencode($array['name']) . "\">Text</a> When I then use this variable on another script. For example $name = $_GET['name']; Should I use urldecode? Link to comment https://forums.phpfreaks.com/topic/221625-urlencodeurldecode/#findComment-1147171 Share on other sites More sharing options...
Adam Posted December 14, 2010 Share Posted December 14, 2010 urldecode Warning The superglobals $_GET and $_REQUEST are already decoded. Using urldecode() on an element in $_GET or $_REQUEST could have unexpected and dangerous results. Link to comment https://forums.phpfreaks.com/topic/221625-urlencodeurldecode/#findComment-1147184 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.