This might help... Put this at the top of each page:

        reset ($_POST);
        while (list ($key, $val) = each ($_POST)) {
            //echo "$key => $val<br>\n";
                $$key = $val;
        }

You could do the same for $_GET if you need to as well.

DÆVID.

> -----Original Message-----
> From: Michael Greenspon [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, January 03, 2003 5:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] locally enabling register_globals?
> 
> 
> Thanks. This is what we've chosen to do-- 'fix' the code.
> Unfortunately this was all written 'old style' by novices, so 'fixing'
> it by putting in references to $_GET, $_POST etc. doesn't really lend
> any clarity to it. Values are still splayed out across multiple pages
> with no structure. But at least it works now. Still uncertain why the
> php_flag in htaccess didn't do it-- perhaps not enabled with Apache.
> Cheers
> M.
> 
> 
> "Michael J. Pawlowsky" wrote:
> > 
> > Why not just fix your code?
> > 
> > *********** REPLY SEPARATOR  ***********
> > 
> > On 03/01/2003 at 2:50 PM Michael Greenspon wrote:
> > 
> > >Our hosting provider installed PHP 4.2 and thus disabled
> > >register_globals by default which our scripts depend on. 
> We don't have
> > >access to php.ini to change this. This is with Apache. I 
> tried putting
> > >
> > >php_flags register_globals on
> > >
> > >into .htaccess in the directory(s) with pages that need 
> this but it does
> > >not seem to work. How can I enable register_globals 
> selectively for some
> > >directories of pages so that our old scripts work again?
> > >
> > >Thanks
> > >Michael
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, visit: http://www.php.net/unsub.php
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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

Reply via email to