title: PHP check if cookie value equals another variable
body: <p>I have created a cookie with a filmvalue. now i need to check if the cookies value is equal to the same filmvalue or to another value.</p>
  
  <pre><code>if(isset($_COOKIE[votecookie])) 
      { 
      echo "Sorry You have already ranked this film &lt;p&gt;"; 
      header("location: films.php?id=$id");
      exit();
      } 
  </code></pre>
  
  <p>If the filmvalue is equal to the filmvalue already voted on then do the above code. but if the film is not voted on then do some other code.</p>
  
  <p>is there a way to do something like this:</p>
  
  <pre><code>if(isset($_COOKIE[votecookie] &amp;&amp; $cookiefilmvalue = $film)) 
      { 
      echo "Sorry You have already ranked this film &lt;p&gt;"; 
      header("location: films.php?id=$id");
      exit();
      } 
  </code></pre>