preserving variable values across pages.

From: Date: Tue, 12 Feb 2002 06:35:53 +0000
Subject: preserving variable values across pages.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84367@lists.php.net to get a copy of this message
Found this on the php.net, querying the PHP mailing list: ">test.php ------------------------------ $blah=10; include "whatever.php"; >whatever.php ------------------------- echo "The value of blah is: {$blah}"; It just keeps the variable since it's global.. When ur using a function. It can be different, since you have to import these variables." HTH, Andy ----- Original Message ----- From: "Tehn Yit Chin" <tehn.yit.chin@millison.com.au> To: <php-general@lists.php.net> Sent: Tuesday, February 12, 2002 1:22 AM Subject: [PHP] preserving variable values across pages. > 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. > > thanks in advance. > > cheers, > Tehn Yit > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#84367) next »