note 32470 deleted from security.registerglobals by didou

From: Date: Wed, 28 May 2003 16:40:51 +0000
Subject: note 32470 deleted from security.registerglobals by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-49184@lists.php.net to get a copy of this message
Note Submitter: MPHH ---- This is a safe way to override register_globals off [code] // // For PHP's register globals off // This is a safe way to override that. // Created by: MPHH // while(list($varn, $varv) = @each($_COOKIE)) { if (is_null($$varn)) { $$varn=$varv; } } while(list($varn, $varv) = @each($_POST)) { if (is_null($$varn)) { $$varn=$varv; } } while(list($varn, $varv) = @each($_GET)) { if (is_null($$varn)) { $$varn=$varv; } } $varn=null; $varv=null; [/code] I hope this helps.

« previous php.notes (#49184) next »