RE: [PHP] PHP Session register variable not always restored with contents

From: Date: Mon, 30 Sep 2002 16:00:21 +0000
Subject: RE: [PHP] PHP Session register variable not always restored with contents
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-118220@lists.php.net to get a copy of this message
> I have been trying to save a variable using PHP sessions. > > What I find is that while most of the time the variable content is > restored > and available on the subsequent pages, however there are times that the > variable seems to be there but the contents are not. If I hit the browser > refresh a couple of times, it will then work. > What am I doing wrong?? > > Here is the code fragment where the variable is set and kept in session: > > at the beginning: > <?PHP > // routine to allow login to the system and authenticate that login > session_start(); > > : > $adminkey = $row["keychain"]; > print("Keychain: $adminkey<br><hr>"); > session_register(adminkey); should be session_register("adminkey"); Is register globals on or off? ---John Holmes...

« previous php.general (#118220) next »