Re: preserving variable values across pages.

From: Date: Tue, 12 Feb 2002 06:51:52 +0000
Subject: Re: preserving variable values across pages.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84369@lists.php.net to get a copy of this message
On Tuesday 12 February 2002 14:22, Tehn Yit Chin wrote: > Hi all, > > If I have the following code, > > <?php > global $some_var > <FORM action="next_page.php" method="post"> > type="submit" name="submit" value="foobar"> > </FORM> > ?> > > > When the user hits the submit button, the value in some_var disappears? Is > there a way of perserving the value in $some_var. GLOBAL in php is not the same as global in ASP. It is only global within the lifetime of the script. What you need is a hidden element in your form holding the value of $some_var.

« previous php.general (#84369) next »