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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php