register_globals workaround
Posted: Thu Oct 04, 2007 7:46 pm
First off - I understand the security implications of register_globals - please no lectures!
I have some forms that use variables that come in through the form. Rather than use $_REQUEST I think the stuff was written long ago and it uses $name instead.
I am using an environment that unsets globals so if I set "name" in the form it is not available in the script.
Is there a way that I could iterate through the $_REQUEST array and create a variable with the name of the key and the value? In other words...
When I encounter $_REQUEST['name'] I want to create a variable $name and give it the $_REQUEST['name'] value.
Possible?
I have some forms that use variables that come in through the form. Rather than use $_REQUEST I think the stuff was written long ago and it uses $name instead.
I am using an environment that unsets globals so if I set "name" in the form it is not available in the script.
Is there a way that I could iterate through the $_REQUEST array and create a variable with the name of the key and the value? In other words...
When I encounter $_REQUEST['name'] I want to create a variable $name and give it the $_REQUEST['name'] value.
Possible?