note 61543 deleted from function.ini-set by philip
| From: | philip@php.net | Date: | Wed, 29 Mar 2006 18:57:55 +0000 |
| Subject: | note 61543 deleted from function.ini-set by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-106962@lists.php.net to get a copy of this message | ||
Note Submitter: Hotmail resident Tree2054
----
A more terse version of the code presented by Alan Hogan:
Without eval()
<?php
if (ini_get(register_globals)) // If register_globals is enabled
{
$unset = array();
$unset = array_merge(array_keys($_GET), array_keys($_POST), array_keys($_COOKIE));
$unset = array_unique($unset);
foreach($unset as $rg_var)
{
if(isset($$rg_var)) unset($$rg_var);
}
}
?>