Re: newbie: the superglobal $_SESSION

From: Date: Mon, 11 Mar 2002 05:08:24 +0000
Subject: Re: newbie: the superglobal $_SESSION
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87956@lists.php.net to get a copy of this message
it works. <?php session_start(); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 1; } else { $_SESSION['count']++; } echo $count; ?> but the first time,i also get the warning(Warning: Undefined variable: count in C:\WebShare\wwwroot\netk\5\test.php on line 9 ).then ,it outputs 2(3,4.....) can you tell me why it beheave like that? thanks.

« previous php.general (#87956) next »