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... Quote 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); Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/205089-urldecode-all-post/#findComment-1073631 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.