Need Help

From: Date: Mon, 02 Apr 2001 23:06:11 +0000
Subject: Need Help
Groups: php.db 
Request: Send a blank email to php-db+get-8162@lists.php.net to get a copy of this message
Okay, Im having some problem using setcookie(). Basically, I have to form fields, Username/Login. When the username and login are authenticated using mysql, it logs into the secure area. I set the cookie so taht it takes the $username variable that the user entered into the form and on the page the user gets after he logs in I want it to display: Welcome $Domainname. But it's not working. The cookie is not being set. I am using this code on the login page. <?php setcookie("DomainName", $Domainname, 0, "/", ".mydomain.com", 0); ?> .mydomain.com isn't the actual domain, I put my own domain there. $domainname is the form field name. I then use on the second page. $dname = $HTTP_COOKIE_VARS["DomainName"]; Then on the page echo "Welcome $dname"; Still doesn't work. Any help is greatly appreciated. Thanks, Chris

« previous php.db (#8162) next »