note 31298 deleted from security.globals by aidan

From: Date: Wed, 08 Sep 2004 06:04:52 +0000
Subject: note 31298 deleted from security.globals by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76202@lists.php.net to get a copy of this message
Note Submitter: solar at heliacal dot net ---- This construct is handy for getting similar functionality to having register_globals on, but being able to selectively import variables for your form submissions. $param_list=array( 'some_input', 'some_input2' ); /* this will work whether it was GET or POST, doesn't make a difference */ foreach($param_list as $param) @$$param=${"_$_SERVER[REQUEST_METHOD]"}[$param]; If you have inputs in your form with names some_input and some_input2, this snippet would have created $some_input and $some_input2. This way you can just list all your inputs in $param_list and only those are imported.

« previous php.notes (#76202) next »