title: PHP Count Unique Visitors ,, Not Works
body: <p>I am willing to count unique visitors once landing on a specific page,
  I wrote the below code, but the database updates each visit not uniquely,<br>
  tried to check the cookie in chrome settings, but did not find <strong>TestCookie</strong> <br>
  Then tried to check from Inspect-&gt;Network-&gt;Cookies I found my cookie in <strong>response cookies</strong>, <br>
  Actually, I don't know if this means that it was saved or not, because if it is saved, so why database updates each repeated visit...</p>
  <pre><code>&lt;?php include &quot;db.php&quot;; ?&gt;
      &lt;?php
      if(!isset($_COOKIE['TestCookie'])){
        setcookie(&quot;TestCookie&quot;,&quot;yes&quot;,60*60*24*320);
        mysqli_query($dbConnection,&quot;UPDATE visits SET otal_count = total_count+1&quot;);
        print_r($_COOKIE);
      
      }else{
        return false;
      }
      ?&gt;
  </code></pre>