Hello all,
I just wanted to post a suggestion to the site here that might help a lot of people out. It should be widely known by now that PHP has predefined arrays that are super-global in scope and contain all the variables you could ever need at your fingertips. These arrays help incredibly in tracking variables from page to page and creating/destroying sessions and/or session variables and are secure in the way they transfer data. Some of the most useful arrays I will list below but you really should check out www.php.net to get the full scoop on these new toys.
I've starting using these arrays recently and it has made my life a lot easier. One big thing is that PHP now ships with register_globals=off. This causes problems with a lot of people's scripts but if you're using the predefinded arrays, it doesn't affect your code either way. Also I've used sessions for a long time and I've found some wierd things happen when you use the session_start() and session_register/unregister functions. But since I've started using the $_SESSION array, I haven't had a problem.
I hope this helps some people out and I would suggest trying these phat arrays.
Please post any comments or known issues with these predefined arrays here or on www.php.net in the appropriate place.
Atom
ARRAYS
$POST
$GET
$REQUEST
$GLOBALS
$_SESSION
As stated above these are only a few of the arrays defined.