I think I have got some problems with the configuration files or something. If I start a session, registers a variable and gives it a value. Later when I try to get the value from the session variable it is empty.
Here's a simple counter that should be enumerated every time key-button F5 is pressed. But it keeps printing Hello 0 every time. Have tried it on other computers and it works but on my computers it wont work. Would be thankful if someone could please help me. Thanks in advance!
- Code: Select all
<?php
// start a session if there aren't an existing one
session_start();
if (!isset($_SESSION['count']))
{
$_SESSION['count'] = 0;
}
else
{
$_SESSION['count']++;
}
echo "Hello " .$_SESSION['count'];
?>


