Re: SESSION wierdness....

From: Date: Thu, 20 Nov 2003 07:50:56 +0000
Subject: Re: SESSION wierdness....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-170395@lists.php.net to get a copy of this message
David HM Spector wrote:
I am writing a multi-page form, on the first page I session_register() a mess of variables (8 of them), the first time through the form everything works as expected, I can get things out of form variables and into relevant the $_SESSION variables. Items are put into the $_SESSION variables on the submit. However, if I go back through the form again, the data in the $_SESSION variables is never updated. For example, if I start the form over again from page 1, there is data still in the $_SESSION variables (which I expect) but attempting to update it in the submit section never changes what's stored in the session. Another thing that's odd is that I must coerce data into the $_SESSION variables by explicit assignment -- even with register_globals ON I cannot do a session_register('some_variable') on the first page of the form and then simply use $some_variable to update the stored session data on any of the pages.
session_register( ) is depreciated with your version of PHP (4.2.2). Just do the following... $_SESSION["homer"] = "doh!"; And set register_globals = off. http://us4.php.net/manual/en/function.session-register.php - rob http://www.phpexamples.net

« previous php.general (#170395) next »