PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi Guys,
I need your help please.
Can you point to me the error in this code??
The counting supposed to increment by 1 everytime
I reload the page but it is not just working.
Thanks
God Bless You
<?
session_start();
session_register("SESSION");
if (!isset($SESSION)) {
$SESSION["count"] = 0;
echo "<li>Counter initialized, please reload this page to see it increment";
} else {
echo "<li>Waking up session $PHPSESSID";
$SESSION["count"]++;
}
echo "<li>The counter is now $SESSION[count] ";
?>
<?
session_start();
if (!isset($_SESSIONї'count'])) {
$_SESSIONї"count"] = 0;
echo "<li>Counter initialized, please reload this page to see it increment";
} else {
echo "<li>Waking up session ".$_COOKIEї'PHPSESSID'];
$_SESSIONї"count"]++;
}
echo "<li>The counter is now ".$_SESSIONї'count'];
?>