title: php cookie in firefox will not expire
body: <p>I have a simple login setup, where I use a cookie to store a login ID #, and with this ID, username and other information can be displayed.</p>
  
  <p>So in order to logout, I run the following php script to log out:</p>
  
  <pre><code>&lt;?php
  if (isset($_COOKIE['id'])) {
  setcookie("id","",1);
  }
  header("Location: redirectpage.html");
  exit;
  ?&gt;
  </code></pre>
  
  <p>Which basically expires the cookie.  However, when I arrive at the redirect page, which has the following code:</p>
  
  <pre><code>If (isset($_COOKIE['id'])) {
  //display "You are logged in already"
  } else {
  // show login form
  }
  </code></pre>
  
  <p>It says I am still logged in, and moving to a different pages still says I am logged in, and displaying the cookie value gives me an actual value, meaning the cookie has not expired.  I must be missing something here, but why has the cookie not expired?</p>
  
  <p>Note: I changed the expiration date from time()-60 or some value to 1, but this did not change anything, and removing the if statement to just expire the cookie every time the php code runs still does not do the trick.</p>