// CLIENT GLOBAL FUNCTION TO PARSE $_SESSION IF 'tempIDArray' IS SET
function parseTempIDArraySession() {
$tempIDArray = $_SESSION['tempIDArray'];
$_GET = $_SESSION[$_GET['tempID']]; // RESET $_GET WITH SESSION ARRAY
get_to_post(); // $_POST = $_GET
foreach ($tempIDArray as $tempID) unset($_SESSION[$tempID]);
print_r("POST: "); print_r($_POST); print_r("<P>");
extract($_POST, EXTR_SKIP);
foreach ($_POST as $key => $val) $GLOBALS[$key] = $val;
unset($_SESSION['tempIDArray']);
}
This function will take everything out of $SESSION[$tempID] and put it into $GET and then into $POST. Then it will take everything out of $POST and make everything global whether register_globals is on or off.
It doesn't work, surprise surprise.
In fact, all that doesn't work is the part whereby everything that eventually winds up in $_POST is never global. Once you leave the function all the variables vanish.
I am having to do this elaborate methodology because I have a requirement to do a file/database action upon a query string while keeping the query string secure; therefore, the key=val pairs normally found in the query string are in a $SESSION variable. So ultimately I have to extract everything from that session variable and put it to an autoglobal that my server-side validation and action classes can use: $POST (it only uses $POST and no other autoglobal!). I can actually get it so that it reads $POST, but I need to get the global value for each key in $_POST available once again because of the fact that a class method must have at least one value: $refAction, and $GLOBALS['refAction'] does not even work!
Phil