Storing Superglobals

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
neridaj
Forum Commoner
Posts: 40
Joined: Fri Jan 05, 2007 9:55 pm

Storing Superglobals

Post by neridaj »

Hey,

I'm wondering if it is a good idea to store $_POST, $_GET vars in an include file. I have a lot of repeating vars and was wanting to consolidate them into one file to be included whenever such vars were needed, is this a bad idea?

Thanks,

Jason
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Storing Superglobals

Post by Christopher »

I assume you mean 'access' and not 'store'. Yes, it can be a good idea to centralize where and how you access the request superglobals.
(#10850)
Post Reply