Re: Session Managment?

From: Date: Wed, 05 Jul 2000 17:06:20 +0000
Subject: Re: Session Managment?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-5007@lists.php.net to get a copy of this message
Hi Andrei! On Wed, 05 Jul 2000, Andrei Zmievski wrote: > On Sat, 01 Jul 2000, Teodor Cimpoesu wrote: > > Then, I would really appreciate if somebody would explain how > > session_register() works, namely where does it look for those > > variables. I sow least "register_globals" affects its behaviour. > > In Java you have setAttribute('name', object), which is far more > > easy to use (to me:) > > If register_globals is off, session_register("foo") will result in > $HTTP_SESSION_VARS["foo"] being saved. If register_globals is on, then > it will save the global variable $foo. > Thanks. I finally figured it out from the sources, though I had some fun guessing what those LOTSOFUNDOCUMENTEDMACROS do :) But isn't that inconsistent? Just a though. Wouldn't it be much simpler to have someting like session_register('registration.name',$variable), and session_get ('registration.name') [ returning a reference] ? And BTW, you said it will save the global variable $foo, which is IIRC the same as $GLOBALS['foo']. So basically it choses between HTTP_SESSION_VARS and GLOBALS to look for `foo'(depending of settings) is that correct? -- teodor

« previous php.general (#5007) next »