1

Temat: setcookie

<?php
  if (empty($_COOKIE['test1']))
  {
    setcookie("test1", 1, time()+3600*24); //24h
    $c=1;
  }
  else
  {
    $c = (int)$_COOKIE['test1'];
    $c++;
    setcookie("test1", $c, time()+3600*24); //24h
  }
?>
<body bgcolor=silver>

<?php
  echo "<h1>".$c."</h1>";
?>