On Wed, 28 May 2003 16:13:22 +0200, [EMAIL PROTECTED] 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.  :)




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to