Declaring Session

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Which one of these is the proper or suggested way to declare session
variables.  I've seen so many different ways but when I use
session_register the pages are way slower.

1. session_register("MM_UserID");
    $HTTP_SESSION_VARS['MM_UserID'] = $theID;

2. session_register("MM_UserID");
    $_SESSION['MM_UserID'] = $loginusername;

3. $_SESSION['MM_UserID'] = $loginusername;

Three works best for me and is the fastest but don't know the
advantages or disadvantages of doing it that way.  Option two was
taking forever.

Re: Declaring Session

Barkster said the following on 02/04/2006 23:29:
Quoted text here. Click to load it

If you read the manual ( ), you would see  
that session_register() is deprecated, and has nothing to do with  

$_SESSION is the way forward!


Re: Declaring Session

Thanks, must have missed that in the manual.

Site Timeline