Auto $_GET

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Auto $_GET

Post 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!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

register_globals to on... but that's easily dangerous. Not a good idea.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

turn register globals ON (not smart). Alternatively you could simply add

Code: Select all

extract($_GET);
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

feyd wrote:register_globals to on... but that's easily dangerous. Not a good idea.
I'll do it temporarily.
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post 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...
Post Reply