RE: [PHP] rectified - - problems with sessions

From: Date: Wed, 10 Oct 2001 15:27:40 +0000
Subject: RE: [PHP] rectified - - problems with sessions
Groups: php.general 
Request: Send a blank email to php-general+get-70682@lists.php.net to get a copy of this message
> Is that me wrong or you should declare the session first and > then assign > a value to variable? > > <? > session_start(); > session_register("value"); > $value = 908; > header("location: new location"); > ?> Maxim, I wrote some example code like above to this list. Here is what Sascha Schumann had to say about it: <quote> Note that session_register() will implicitly commence the session, and thus will automatically instantiate all session variables. Hence, the above two lines need to be reversed, otherwise you might overwrite the session variable. - Sascha Experience IRCG </quote> I'm not sure I know what that means, but FWIW ;) Kirk

« previous php.general (#70682) next »