Re: Login with Remember me Feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



alekto wrote:
Hi,
I have implemented a "remember" me feature in my login-script, but I can't get it to function!


If I might be so bold... then you haven't implemented the feature yet, right? ;-)


I want to make it possible for the users to stay logged in for 30 days.
This is what I got this far:


You have a logic problem... If I were you, I would write it out more simplistically first... something like:

if session cookie
  keep logged in
else, if remember me
  if verifiable
    set session cookie and redirect

Of course, that is not an example of exact logic to use, and is just a method example of how you can solve your problem. As others have suggested, I would first start reading about ob_start,ob_end_clean(which
works well before a header redirect), and ob_end_flush.

I agree about only needing to store the user ID in your cookie's (session and rememberme) (hashed perhaps), and not the password.

My last comment would be a kind request to strip out all unnecessary html etc.. when posting questions to the list. I usually would not take the time to look through a mess like that. ;-)

Donovan

--
D Brooke

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux