Re: Cookie Woes
| From: | scott furt | Date: | Tue, 19 Mar 2002 12:08:20 +0000 |
| Subject: | Re: Cookie Woes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89111@lists.php.net to get a copy of this message | ||
because the first argument of Setcookie is the name
of the cookie you want to set.
(and what the variable will be called on subsequent pages)
SetCookie('username', $username ...) will do what
you're expecting.
Jesse Warden wrote:
I performed a: setCookie($username, $username, time()+3600,"", "", "0"); echo header("Location: projects.php"); ... on a php page that deals with a form submission. However, when I get to projects.php, it claims $username doesn't exist. The book said that to get a variable from a cookie, all I need to do is call a variable name that is the same name as what I named the cookie. Any suggestions? TIA, J ** Scanned for Viruses **