Re: code for my question about sessions ;) sorry

From: Date: Thu, 05 Dec 2002 16:07:35 +0000
Subject: Re: code for my question about sessions ;) sorry
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127165@lists.php.net to get a copy of this message
[snip] > function login($username) > { > global $valid_user; > $valid_user = $username; > session_register("valid_user"); > } It _should_ work. My only guess is that maybe because you're registering something inside of a function, it's messing up, even though the variable is global. I don't do it this way, and I prefer register globals off, so I don't know if that's an issue or not. ---John Holmes...

« previous php.general (#127165) next »