Re: One good thing about $_SESSION

From: Date: Wed, 26 Dec 2001 13:57:45 +0000
Subject: Re: One good thing about $_SESSION
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-78775@lists.php.net to get a copy of this message
At 11:59 AM 12/26/2001 -0200, Julio Nobrega Trabalhando wrote:
Is that while porting a script to PHP 4.1.0, where I used to check: if (session_is_registered('del_power') && $del_power == 1) {
    // del stuff
} Because $del_power could be registered as 1 or 0, now I can do: if ($_SESSION['del_power'] == 1) {
    // del stuff
} Nice. Less typing and easier to read.
Couldn't you have done this with your original script? : if ($HTTP_SESSION_VARS['del_power'] == 1) {
        //
} ??

« previous php.general (#78775) next »