note 23419 added to security.registerglobals
| From: | rpetriychuk at mnt dot kg | Date: | Thu, 18 Jul 2002 05:58:44 +0000 |
| Subject: | note 23419 added to security.registerglobals | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33231@lists.php.net to get a copy of this message | ||
To keep using old style of form variables handling and in same time be protected you can use
function like this:
function catch_request($name)
{
$GLOBALS[$name]=NULL;
if(isset($_REQUEST[$name])):
$GLOBALS[$name]=$_REQUEST[$name];
endif;
}
Just add catch_request("VAR") line for each variable that you expect to be received from
the form.
--
http://www.php.net/manual/en/security.registerglobals.php
http://master.php.net/manage/user-notes.php?action=edit+23419
http://master.php.net/manage/user-notes.php?action=delete+23419
http://master.php.net/manage/user-notes.php?action=reject+23419