note 13422 deleted from language.variables by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 18:47:38 +0000 |
| Subject: | note 13422 deleted from language.variables by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25179@lists.php.net to get a copy of this message | ||
Here is a slick set of loops that will fix code that is placed on a box with --enable-track-vars
turned on... keeps you from having to define all of your GPC's explicitly... However, this
could be a bad thing: ) You may need to switch the order to match the paradigm that the code was
written under...IE if your order is CGP you would need to alter it.
<?PHP
while(list($key, $val) = each($HTTP_GET_VARS)){
$gbuild = "$".$key;
$gbuild.="=";
$gbuild.=addslashes($val).";";
eval($gbuild);
}
while(list($key, $val) = each($HTTP_POST_VARS)){
$pbuild = "$".$key;
$pbuild.="=";
$pbuild.=addslashes($val).";";
eval($pbuild);
}
while(list($key, $val) = each($HTTP_COOKIE_VARS)){
$cbuild = "$".$key;
$cbuild.="=";
$cbuild.=addslashes($val).";";
eval($cbuild);
}
?>