Re: newbie-php user tracker prob

From: Date: Tue, 11 Feb 2003 21:04:42 +0000
Subject: Re: newbie-php user tracker prob
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135243@lists.php.net to get a copy of this message
--- Fireborn Silvaranth <webmaster@faxonautolit.com> wrote: > I'm trying to grab a number (sessionNum) out of a text file and increment > it whenever someone leaves and comes back to the site. How about this: <? session_start(); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 0; } else { $_SESSION['count']++; } echo 'You have visited ' . $_SESSION['count'] . ' times before.'; ?> Chris

« previous php.general (#135243) next »