This is a test script so I can get an understanding of Cookies.  What am
I missing with this?  $cookieuser never gets a value.

<?
  $user       = $HTTP_GET_VARS[user];
  $pw         = $HTTP_GET_VARS[pw];
  $cookieuser = $HTTP_COOKIE_VARS[user];
  if (!$cookieuser) {
    setcookie("user", $user, time() + 864000);
    print("Setting a cookie<br>");
  }

  print("The user is " . $user . "<br>");
  print("The password is " . $pw . "<br>");
  if (empty($cookieuser)) {
    print("No cookie was set...will set one<br>");
  } else {
    print("Cookie user name: " . $cookieuser . "<br>");
  }
?>



--
Todd Cary
Ariste Software
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to