Huijari Posted June 17, 2010 Share Posted June 17, 2010 So I have code: foreach($_REQUEST as $var => $value) { echo '&' . $var . '=' . $value . "&"; } I would need to to do urldecode() to all REQUEST (posted variables) How would I do it? Because my url is: http://www.finsite.net/testi/example1/example2/get_level.php?levelcode2=%26var1%3D403%26var2%3D254%26varname%3Dvariable And I need to get those vars in php. Have to put somekind of code urldecode(_REQUEST) all requests... Link to comment https://forums.phpfreaks.com/topic/205089-urldecode-all-post/ Share on other sites More sharing options...
Alex Posted June 17, 2010 Share Posted June 17, 2010 $_REQUEST = array_map('urldecode', $_REQUEST); Link to comment https://forums.phpfreaks.com/topic/205089-urldecode-all-post/#findComment-1073575 Share on other sites More sharing options...
Huijari Posted June 17, 2010 Author Share Posted June 17, 2010 It works but, well if you test the url I showed, you see it won't get those variables. I think its because there should be &var1=something but there isnt. Link to comment https://forums.phpfreaks.com/topic/205089-urldecode-all-post/#findComment-1073631 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.