title: Notice: Undefined variable: HTTP_COOKIE_VARS nd Undefined index:Mycookie
body: <p>I am trying to create a cookie  and set its values but getting the above errors </p>
  
  <pre><code>&lt;?php
  $value='chhaya';
  setcookie("Mycookie",$value);
  //time()+1800 means cookie will expire in half an hour
  setcookie("chhaya","ralph",time()+1800,"C:\\xampp\\htdocs\\php\\","",1);
  echo $_COOKIE["Mycookie"];
  echo $HTTP_COOKIE_VARS["Mycookie"];
  ?&gt;
  </code></pre>