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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php