title: keep track of user page view using cookie php
body: <p>I have this code here:</p>
  
  <pre><code>setcookie('visitcount',1+$_COOKIE['visitcount'],time()+60*60);
  $visitcount = $_COOKIE['visitcount'];
  print "Number of views: ".$visitcount;
  </code></pre>
  
  <p>What I'm trying to do is keeping track of the page views the current viewer using cookie.  I'm a bit confused with this code because when the web visitor views the webpage for the first time, the result came back saying "Number of views: 0", when it should be "Number of views: 1".</p>
  
  <p>Why is that the case?  I thought with setcookie code above, the $visitcount variable should have a value of one.  But it isn't so??</p>