Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-14 Thread Analysis & Solutions
On Tue, Aug 13, 2002 at 10:07:57AM -0700, Rasmus Lerdorf wrote: > > while ( list($Key, $Val) = each($_SESSION) ) { > > $$Key = $Val; > > } > > extract($_SESSION) is a better way to do that. Yeah. Old habits die hard! :) --Dan -- PHP classes that make web desi

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-13 Thread Rasmus Lerdorf
> while ( list($Key, $Val) = each($_SESSION) ) { > $$Key = $Val; > } extract($_SESSION) is a better way to do that. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-13 Thread Rasmus Lerdorf
No real reason to start the session in index.php. You are not registering any session vars, nor are you accessing any. > index.php >session_start(); > ?> > > > > > Admin Login > > > > Username: > > > > > > Passwor

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-13 Thread Analysis & Solutions
Petre: On Tue, Aug 13, 2002 at 03:18:42PM +0200, Petre Agenbag wrote: > > I have register_golbals = on, BUT, I want to find a way to code that I > know will always work, regardless of register_globals or cookies, so > that I am only dependant on the trans-sid ( but If I could rule that out > too,

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-13 Thread Petre Agenbag
Rasmus OK, I think I understand the principle now, yet, when I implement id, my app still fails. I have register_golbals = on, BUT, I want to find a way to code that I know will always work, regardless of register_globals or cookies, so that I am only dependant on the trans-sid ( but If I could ru

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Rasmus Lerdorf
No, you don't need to use HTTP_SESSION_VARS for anything if register_globals is on. Sessions are very simple. You start a session, and you register variables to be part of that session. Like this: session_start(); session_register('a'); session_register('b'); If you have that at the top of

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Petre Agenbag
Oh, almost forgot, I *think* the reason why I'm still worrying about the $HTTP_* arrays are because I *think* that it is the correct way to work with the vars once register_globals is turned off ( which is where things are moving to right?), and I don't want to re-code my scripts... Am I making s

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Petre Agenbag
You lost me there... Are you saying I don't need to access those variable in that way? Can I simply use $variable in successive pages then? Surely I MUST use that notation to assign values then right?, specially to the session vars, right? But, just out of curiosity, why does it work fine on my n

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Rasmus Lerdorf
If register_globals is known to be on, why are you worrying about the $HTTP_* arrays? On 12 Aug 2002, Petre Agenbag wrote: > Hi > Me again > > Still having problems with forms not sending variables, and session > variables dissapearing. > > I have 2 systems, one older 4.0.3 PHP which is my main

[PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Petre Agenbag
Hi Me again Still having problems with forms not sending variables, and session variables dissapearing. I have 2 systems, one older 4.0.3 PHP which is my main webserver, so all scripts must comply with it... And the other my development server with the latest 4.1.2 So, I'm trying to write scrip