title: Unable to setcookie in any browser
body: <p>So I have done a lot of reading on setting cookies and still cannot find what I am doing wrong here. I started with an <code>if</code> statement to include another script but it soon became clear the cookie wasn't setting so I simplified it and made it just to echo so I could see if it was setting. Its not.  I am including it above the <code>&lt;html&gt;</code>.</p>
  
  <p>I am setting the cookie and then refreshing and no matter how many times I refresh it is still returning a <code>NULL</code> result in the <code>echo</code> command. </p>
  
  <ul>
  <li>The <code>setcookie</code> is above all of my html, cookies can't be set after any output??</li>
  <li>The value is set, and domain.</li>
  <li>All browsers have cookies enabled, and friends have tested this for me so its not local. </li>
  <li>Its not the server, I asked my host. </li>
  <li>I have even copy/pasted code from <a href="http://php.net/manual/en/function.setcookie.php" rel="nofollow">PHP manual</a> to no avail.</li>
  <li><p>And of course checked SO a few mil times. </p>
  
  <pre><code>$var='Something';
  setcookie ("Name", "$var", time()+3600, '/', 'website.com');
  echo $_COOKIE["Name"];
  var_dump($_COOKIE["Name"]);
  var_dump ($HTTP_COOKIE_VARS); 
  </code></pre></li>
  </ul>
  
  <p><code>echo</code> returning <code>NULL</code> and <code>var_dump</code> returning <code>Array(0)</code></p>
  
  <p>I am going mad, is there something wrong in my code, what am I missing?</p>