<?php 
  // Check if cookie count is enabled
  if(isset($_COOKIE["count"])) {
    // if yes, increment its value and display it
    $count = $_COOKIE["count"];
    $count++;
    setcookie("count", $count, time()+600);
 ?>

<html>
<head>
   <title>Cookies</title>
</head>

<body>
<h1>Cookie 'count' incremented. Value is <?=$count?></h1>

<ul>
<li>Click here to <a href="increment-count.php">increment count</a></li>
<li>Click here to <a href="delcookie.php">destroy the count cookie</a></li>
</ul>

<?php  
  } else
      printf("<h1>Cookie count is not enabled in this browser</h1>\n");
?>

</body>
</html>