Suman wrote:
Thanks for the quick answer Micha.
I tried simply using
<?php
session_start();
$_SESSION['counter']++;
echo $_SESSION['counter'];
?>
and it only displays 1 no matter how many times i refresh so still not
working. The browser is set to accept cookies as well.
suman
If you enable all errors and display them, you'll find you get a notice
on the first run because $_SESSION['counter'] is not defined.
This should be:
<?php
session_start();
if (isset($_SESSION['counter']))
$_SESSION['counter']++;
else
$_SESSION['counter'] = 1;
echo $_SESSION['counter'];
?>
But other than the original notice, it should work OK.
You need to enable all errors and display them to find out what your
real problem is. In your php.ini file, you should have:
error_reporting=E_ALL
display_errors=on
These should be on for all development systems (but display_errors
should be off on production systems).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================