Sessions with register_globals = off

From: Date: Fri, 06 Sep 2002 17:34:56 +0000
Subject: Sessions with register_globals = off
Groups: php.general 
Request: Send a blank email to php-general+get-115527@lists.php.net to get a copy of this message
Hello, I'm working with register_globals turned off. I'm setting this session cookie: if ($nresult) { if (mysql_numrows($nresult)) { session_start(); $_SESSION['auth'] = 'TRUE'; } } And then I'm checking if the cookie is set, but it doesn't work: if ($_SESSION['auth'] == 'TRUE') { show_menu(); } Is there any error on my code ? What am I doing wrong ? I read this on http://www.php.net/release_4_1_0.php: "Another neat trick is that creating new entries in the $_SESSION array will automatically register them as session variables, as if you called session_register(). This trick is limited to the session module only - for example, setting new entries in $_ENV will *not* perform an implicit putenv()." That's what I am not using sessione_register($variable). TIA, _____________________ Mauricio Cuenca

« previous php.general (#115527) next »