Re: Remember me function
| From: | Brad Brevet | Date: | Fri, 03 Dec 2004 17:56:04 +0000 |
| Subject: | Re: Remember me function | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-203443@lists.php.net to get a copy of this message | ||
Nevermind, I figured it all out, thanks for the info.
"Brad Brevet" <bradbrevet@ropeofsilicon.com> wrote in message
news:20041203174334.6711.qmail@pb1.pair.com...
> 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" <destiney@gmail.com> wrote in message
> news:ea9da26c0412030823da546dd@mail.gmail.com...
> > On Fri, 3 Dec 2004 07:38:47 -0800, Brad Brevet
> > <bradbrevet@ropeofsilicon.com> 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/