title: How to set a cookie in php?
body: <p>I set a cookie and then check if exist like this</p>
  
  <pre><code>if(isset($_COOKIE["fan"]))
  {
  //Do Nothing
  }
  else
  {
  $cookie = "yes";
  $expire=time()+60*60*24*30;
  setcookie("fan", $cookie, $expire);
  include_once("../inc/functions.php");
  echo fan_page();    
  }
  </code></pre>
  
  <p>When I test on my local machine, it works, but when i upload to production server, it doesn't work.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks In Advance!</p>
  
  <p>Marc</p>