Re: switch-statement overrides use of global arrays?

From: Date: Tue, 30 Oct 2001 01:36:01 +0000
Subject: Re: switch-statement overrides use of global arrays?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-72801@lists.php.net to get a copy of this message
Christian Reiniger wrote: > So you want to share the array across *requests* > That doesn't have *anything* to do with "global". > > Have a look at how HTTP works - each request is an isolated execution of > a PHP script. it doesn't have any idea of what other pages the user > already looked at. To archieve your stuff you need session management > (phpbuilder.com has a nice tutorial on this) Indeed, this is something I only came to know yesterday when Henrik replied with an answer along the same line: every new instance of the script is isolated from earlier instances, and therefore does not recognize the array. I was confused though, because I thought it could be done as I succesfully transferred other variables. Turned out all those variables were transported inside a FORM, which does get recognized across multiple instances of the script. I'll have a look at documents on session management, thanks for the advice! -- Imar de Vries - I.O.deVries@students.let.uu.nl - ICQ 6972439

« previous php.general (#72801) next »