title: php Notice: Undefined index: login in C:\xampp\htdocs\index.php on line 55
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4261133/php-notice-undefined-variable-and-notice-undefined-index">PHP: &ldquo;Notice: Undefined variable&rdquo;  and &ldquo;Notice: Undefined index&rdquo;</a>  </p>
  </blockquote>
  
  
  
  <p>I am getting warnings. I would like to take care of it. Here is the offending code</p>
  
  <pre><code>if ($_REQUEST['login']) $user = $_REQUEST['login'];
  elseif ($_COOKIE['user']) $user = $_COOKIE['user'];
  
  if ($_REQUEST['encpas']) $pass = $_REQUEST['encpas'];
  elseif ($_COOKIE['pass']) $pass = $_COOKIE['pass'];
  
  if ($_REQUEST['randsess']) $sess = $_REQUEST['randsess'];
  elseif ($_COOKIE['sess']) $sess= $_COOKIE['sess'];
  </code></pre>
  
  <p>I am not sure how to get rid of them.</p>
  
  <p>Thanks</p>