title: PHP - I want the user to have no possibility to upvote more than one time
body: <p>I am working on a small social network with PHP and MySQL
  I want the users to have the possibility to upvote a post, and I already did this but the problem is that I want the user to be able to upvote only one time.</p>
  
  <p>Here is my PHP code: </p>
  
  <pre><code>if (isset($_POST['heart']))
  { 
    $identificateur = $_POST['hide'];
    $Q = "UPDATE posts  SET avis = avis + 1 where id=$identificateur ";
    $bdd-&gt;query($Q);
  }
  </code></pre>
  
  <p>This is the form of the upvote button :</p>
  
  <pre><code>&lt;form action="p.php" method="POST"&gt;
          &lt;label&gt;&lt;?php 
          if ($avis != 0)
                      {
                          echo $avis; 
                      }
          ?&gt;&lt;/label&gt;
          &lt;input type="hidden" value="&lt;?php echo "$id" ?&gt;" name="hide"&gt;
          &lt;input type="submit" value=" " id="heart" name="heart"&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>Every user should have the right to click on the up vote icon only once.
  Thank you very much in  advance.</p>