Page 1 of 1

Auto $_GET

Posted: Tue Aug 09, 2005 7:18 pm
by Shendemiar
I'm continuing someone elses work, and he just pulls a $page variable out of nowhere. The url is blaah.com?page=some

i'd like not to change much of his code at beginning. What setting i need to change in my php.ini to adapt to this awfull practise!

Posted: Tue Aug 09, 2005 7:19 pm
by feyd
register_globals to on... but that's easily dangerous. Not a good idea.

Posted: Tue Aug 09, 2005 7:20 pm
by John Cartwright
turn register globals ON (not smart). Alternatively you could simply add

Code: Select all

extract($_GET);

Posted: Tue Aug 09, 2005 7:20 pm
by Shendemiar
feyd wrote:register_globals to on... but that's easily dangerous. Not a good idea.
I'll do it temporarily.

Posted: Tue Aug 09, 2005 7:23 pm
by Shendemiar
Jcart wrote:turn register globals ON (not smart). Alternatively you could simply add

Code: Select all

extract($_GET);
Thanks, i'll use that later when starting to alter the stuff...