note 25549 added to language.variables.external
| From: | gnarf at iziforum dot com | Date: | Fri, 27 Sep 2002 13:00:28 +0000 |
| Subject: | note 25549 added to language.variables.external | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37326@lists.php.net to get a copy of this message | ||
when register_globals is turned off, and u want to use it anyway :)
use this script at the top of your program:
if (is_array($_POST)) {
for (reset($_POST); $key = key($_POST); next($_POST)) {
$$key = $_POST[$key];
}
}
if (is_array($_GET)) {
for (reset($_GET); $key = key($_GET); next($_GET)) {
$$key = $_GET[$key];
}
}
if (is_array($_SESSION)) {
for (reset($_SESSION); $key = key($_SESSION); next($_SESSION)) {
$$key = $_SESSION[$key];
}
}
if (is_array($_COOKIE)) {
for (reset($_COOKIE); $key = key($_COOKIE); next($_COOKIE)) {
$$key = $_COOKIE[$key];
}
}
if (is_array($_PUT)) {
for (reset($_PUT); $key = key($_PUT); next($_PUT)) {
$$key = $_PUT[$key];
}
}
have fun :)
--
http://www.php.net/manual/en/language.variables.external.php
http://master.php.net/manage/user-notes.php?action=edit+25549
http://master.php.net/manage/user-notes.php?action=delete+25549
http://master.php.net/manage/user-notes.php?action=reject+25549