title: PHP set cookie localhost not working
body: <p>The problem is that I can't set a cookie from PHP.
  I've tried to google the problem and searching here on stackoverflow, but
  none of the solutions work. </p>
  
  <p>I've tried:</p>
  
  <pre><code>setcookie('user_id', $row['user_id'], time() + ( 60 * 60 * 8), '/', '127.0.0.1');
  setcookie('user_id', $row['user_id'], false, '/', false);
  setcookie('user_id', $row['user_id'], time() + ( 60 * 60 * 8), '/', false);
  setcookie('user_id', $row['user_id'], time() + ( 60 * 60 * 8), '/', '');
  </code></pre>
  
  <p>The browser I'm using is Firefox 12 and Chrome 19 on an Apache server.</p>
  
  <p>Thanks for your help.</p>
  
  <p>EDIT: There seems to be a problem with my database when I fetch data to put in my cookies,
  so nevermind;) thanks for your time!</p>