Re: [PHP] One good thing about $_SESSION

2001-12-26 Thread Julio Nobrega Trabalhando

  Yes, but I just thought of doing this way when porting :-))

PS: (Not 100% true, there's the question of $_SESSION being global now.
Makes life easier too :-))

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] One good thing about $_SESSION

2001-12-26 Thread Michael Sims

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) {
 //
}

??


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] One good thing about $_SESSION

2001-12-26 Thread Julio Nobrega Trabalhando

  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.

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]