[thelist] PHP - Declaring a temporary variable
Mark Joslyn
mark.joslyn at solimarsystems.com
Mon Feb 4 12:32:00 CST 2002
That did it! Thanks LIST!!
markJ
-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Bill Haenel
Sent: Monday, February 04, 2002 10:23 AM
To: thelist at lists.evolt.org
Subject: RE: [thelist] PHP - Declaring a temporary variable
> I need to set up
> a variable
> or a check to see if $page is set, and if it is not, set it to zero, but
> only on the initial loading of the page.
<?
session_start();
if (!isset($page)) {
session_register("page");
$page = 0;
}
?>
I think this is what you want. This will keep the value of $page for the
remainder of the session, but will only set it to '0' on the first visit.
You can change the value of $page to whatever you want after that.
BH
--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !
More information about the thelist
mailing list