Sessions don't work?

From: Date: Wed, 24 Jul 2002 12:24:39 +0000
Subject: Sessions don't work?
Groups: php.general 
Request: Send a blank email to php-general+get-109289@lists.php.net to get a copy of this message
Hewwo all, (please be so kind as to CC me in replies as I am not a subscriber to this mailing list (yet)) The following code snippet always outputs "You have visited this page 1 times!". What am I doing wrong? " <?php session_start(); if (!isset($HTTP_SESSION_VARS['counter'])) { $HTTP_SESSION_VARS['counter'] = 1; } else { $HTTP_SESSION_VARS['counter']++; } echo(sprintf("You have visited this page %d times!", $HTTP_SESSION_VARS['counter'])); ?> " I realise I could use $_SESSION, and I actually prefer it, but I have to write code that will run on 4.0.6. Versions and the like: PHP 4.2.2 Apache/1.3.26 (Unix) Debian GNU/Linux All this on Linux ppc (benh kernel) 2.4.19 Thanks in advance, -- Alexander Deruwe AQS-CarControl

« previous php.general (#109289) next »