Re: rectified - - problems with sessions

From: Date: Wed, 10 Oct 2001 15:40:34 +0000
Subject: Re: rectified - - problems with sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-70685@lists.php.net to get a copy of this message
I think that : session_start(); if (session_is_registered("value")) session_register("value"); if he switch the places the session_start() is not needed anymore. -- Andrey Hristov Web Developer IcyGEN Corporation BALANCED SOLUTIONS http://www.icygen.com On Wednesday 10 October 2001 18:27, you wrote: > > 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 (#70685) next »