Meetings every second Tuesday
Register Globals
How does PHP handle register globals in session-by-session instances?
I'm using the variable array $_SESSION to (obviously) hold session information.
Is this information globally available to all sessions?
Does each session get it's own instance of register globals?
I'm trying to keep account data separated for multiple users in a login/registration system.
Thanks
Doug




SuperGlobals
The var you mentioned here '$_SESSION' is what is known as a 'Super Global'. 'Register Globals' is a setting in PHP which by default is turned off now due to security concerns.
$_SESSION is global to all php scripts executed to fullfill the user's request but it is confined to the single PHP process that is fullfilling that user's request. So a given $_SESSION array is visible to only one user. (behind the sceens, a 'session' is tied to a given user buy the use of a browser cookie.
There are session security concerns though and php.net does a good job of covering them in the Session documantation.
hope this helps