One good thing about $_SESSION
| From: | Julio Nobrega Trabalhando | Date: | Wed, 26 Dec 2001 13:59:40 +0000 |
| Subject: | One good thing about $_SESSION | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-78774@lists.php.net to get a copy of this message | ||
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