note 117098 deleted from security.globals by cmb

From: Date: Sun, 17 Jan 2021 13:57:02 +0000
Subject: note 117098 deleted from security.globals by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-216180@lists.php.net to get a copy of this message
Note Submitter: thewordsmith at hotmail dot com ---- //Some servers do not have register globals turned on. This loop converts $_BLAH into global variables. foreach($_COOKIE as $key => $value) { if(!is_array($value)){ ${$key} = trim(rawurldecode($value)); //echo "$key $value<br>"; } else{ ${$key} = $value; } } foreach($_GET as $key => $value) { if(!is_array($value)){ ${$key} = trim(rawurldecode($value)); //echo "$key $value<br>"; } else{ ${$key} = $value; } } foreach($_POST as $key => $value) { if(!is_array($value)){ ${$key} = trim(rawurldecode($value)); //echo "$key $value<br>"; } else{ ${$key} = $value; } } foreach($_REQUEST as $key => $value) { if(!is_array($value)){ ${$key} = trim(rawurldecode($value)); //echo "$key $value<br>"; } else{ ${$key} = $value; } } foreach($_SERVER as $key => $value) { if(!is_array($value)){ ${$key} = trim(rawurldecode($value)); //echo "$key $value<br>"; } else{ ${$key} = $value; } }

« previous php.notes (#216180) next »