note 33350 added to security.registerglobals
| From: | drew at drew-phillips dot com | Date: | Mon, 23 Jun 2003 17:40:53 +0000 |
| Subject: | note 33350 added to security.registerglobals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50890@lists.php.net to get a copy of this message | ||
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";
----
Manual Page -- http://www.php.net/manual/en/security.registerglobals.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33350
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33350&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33350&report=yes