title: Php cookie only set for 1 second?
body: <p>Maybe there is a better way around having to use a cookie. But i want to set in my php something to tell the user an error but only have it come on once, if they refresh the page i do no want it there anymore.</p>
  
  <pre><code>$time = (1000);
  setcookie("msgtype", $type, time() + ($time), '/');
  setcookie("msg", $message, time() + ($time), '/');
  print_r($_COOKIE);
  </code></pre>
  
  <p>So for some reason, if i output the $_cookie directly after it still won't display this cookie.</p>
  
  <p>Any ideas?</p>