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

Reply via email to