[thelist] PHP - Declaring a temporary variable
Bill Haenel
bill at webmarketingworx.com
Mon Feb 4 12:21:00 CST 2002
> 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
More information about the thelist
mailing list