Re: Environment variables in PHP

From: Date: Fri, 09 Jun 2000 21:42:09 +0000
Subject: Re: Environment variables in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1456@lists.php.net to get a copy of this message
In article <20000608064653.14956.qmail@web4901.mail.yahoo.com>, dushypops@yahoo.com (dushyanth harinath) wrote: > hi, > Iam using php4 with an apache web server on a red hat > linux 6.1 machine,I want to know how to set > environment variables so that i can use them in any > form. > I tried out by using putenv function and it works fine > when i call the same form using PHP_SELF , but if i > call an another form the value is not set. Any Environment changes you make last for the lifetime of the script only, and are localized to that script: Having them last longer or permeate to other scripts would be a nightmare for almost any usage. You should store the common data in a database (easy) or pass it as part of the form in HIDDEN inputs (easy) or shared memory (kinda tricky) -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#1456) next »