The answer, like yahoo, is to also store the username and password in
a database. When the cookie is not set or the option not checked, you will
use a database to validate the username and password.
You will build a session only if the username and password are matched
in the database.
py
----- Original Message -----
From: Batis <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 7:08 PM
Subject: [PHP] Remember my username & password
>
> Hello everyone,
>
> I want to build an authentication system like when entering Yahoo!. I.e.
> each user can sign-up for a username, which has a password. When he enters
> the site, there's a login box:
>
> Username: [textbox]
> Password: [password textbox]
> [checkbox] Remember my username & password
>
> If he checks the checkbox, then when he next visits the site (let's say
the
> next day), he will be automaticly entered, as the login info will be
stored
> in a cookie.
>
> What if the checkbox is unchecked? How can I store the login info
> temporarily and when he closes the browser (like in an HTTP
authentication)
> the info would be gone?
>
> Is the PHP 4 session management the solution to my problem?
>
> .................................................................
> .. Dimitris Batis ....................... [EMAIL PROTECTED] ..
> .. http://www.ravencrypt.com ....................................
> .. ICQ: 18204204 .................... Yahoo! ID: deggial_wrath ..
> .................................................................
>
> "The road to truth is long, and lined the entire way with annoying
bastards."
> -- Alexander Jablokov, The place of no shadows
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]