title: Cookies and Random Numbers in PHP
body: <p>It's a quick question:</p>
  
  <p>How can I generate cookies with a random identifier ?</p>
  
  <p>I mean I'm trying to set a cookie whose name comes from a rand number and then I try to read the cookie but I get errors.</p>
  
  <pre><code>$random = rand(1,1000);
  setCookie($random,'value',time()+3600,"/");
  echo $_COOKIE[$random]; //and I get a Undefined offset
  </code></pre>