Forum Moderators: coopster
Session_OnStart - This event occurs EVERY time a NEW user requests his or her first page in the ASP application.
Is there an equivalent feature to the Global.asa in PHP? I'm working on a site that is hosted on a UNIX server, running PHP. I'd like to do a DB lookup to check the visitor's IP address and set a global session variable for that user (but only do it once versus doing the lookup on each page).
Any feedback would be much appreciated.
if(!isset($_SESSION['session_var'])) {
Start_Session();
}
Then you'd be able to put whatever you wanted in the Start_Session function that you want to execute the first time the session is initiated.
Here's some more info on sessions [us2.php.net].
Good luck :)