note 33350 deleted from security.registerglobals by philip
| From: | philip@php.net | Date: | Wed, 02 Jul 2003 18:44:05 +0000 |
| Subject: | note 33350 deleted from security.registerglobals by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-51376@lists.php.net to get a copy of this message | ||
Note Submitter: drew@drew-phillips.com
----
Very simple and easy way to get all $_GET and $_POST values into normal variables for those with
register globals off.
function getRequest() {
foreach($_REQUEST as $name => $value) {
$$name = $value;
}
Example:
$_POST["var1"] = "abc";
$_POST["var2"] = "def";
$_GET["var3"] = "ghi";
will give you variables
$var1 = "abc";
$var2 = "def";
$var3 = "ghi";