Re: Variables don't pass... *sniff*

From: Date: Wed, 28 May 2003 14:25:22 +0000
Subject: Re: Variables don't pass... *sniff*
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149248@lists.php.net to get a copy of this message
On Wed, 28 May 2003 16:13:22 +0200, daniel@rhesusb.dk wrote: >if (!empty($_POST)) { > extract($_POST); >} else { > extract($HTTP_POST_VARS); >} > >And have it in an include file, "extract_post.php". >This way I can just include it and all variables are available, just like if >register_globals had been on. Yup! You could even add that php to the auto_prepend_file variable in your php.ini or add this to your .htaccess file (assuming you are running Apache and have overwrite turned on) and the prepend will happen automagically on every php program: php_value auto_prepend_file "/www/extract_post.php" However, both of these "solutions" create the same security issue that turning RegisterGlobals on took care of in the first place. :)

« previous php.general (#149248) next »