title: why can't I create cookies in Firefox?
body: <p>I am not able to create a Firefox cookie with following line:</p>
  
  <pre><code>    setcookie("TestCookie", $value, time()+3600, "/", "localhost");
  </code></pre>
  
  <p>Does someone know why?</p>
  
  <p>I have checked the settings in FF and it accepts cookies from 3rd parties and are deleted when they expire.</p>
  
  <p>EDIT: I can create now with this line:</p>
  
  <pre><code>$domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false;
  setcookie('cookiename', 'data', time()+60*60*24*365, '/', $domain, false);
  </code></pre>
  
  <p>but how do I delete it?</p>
  
  <p>I tried with just switching the + to - but it didn't work.</p>
  
  <pre><code>$domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false;
  setcookie('cookiename', 'data', time()-60*60*24*365, '/', $domain, false);
  </code></pre>