Is this the all I would need to do to set a cookie with a username stored
for 30 days? Sorry I am new at this.

setcookie ("Cookie Name", $username, time()+60*60*24*30);


"Greg Donald" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Fri, 3 Dec 2004 07:38:47 -0800, Brad Brevet
> <[EMAIL PROTECTED]> wrote:
> > Hey all, I have a log-in all set up on my site using PHP Sessions but I
want
> > to add the Remember Me function, but I don't know what to set in the
cookie
> > to make it that way. Please help. :)
>
> Set a cookie, then check for it later.  If it exists, bypass the login
> and grant a session or whatever you're doing now for logged-in users.
> You might also want to set a session variable that the cookie has been
> 'looked for' so it doesn't relog them in on each page request.
>
> php.net/setcookie
>
>
> -- 
> Greg Donald
> Zend Certified Engineer
> http://gdconsultants.com/
> http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to