Authentication using session.
| From: | J.F.Kishor | Date: | Wed, 07 Aug 2002 06:34:16 +0000 |
| Subject: | Authentication using session. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-111477@lists.php.net to get a copy of this message | ||
Hello All,
I would like a solution for the following
We should accept a login and password in a login screen.These values
should be Authenicated using a database.If it is a valid user then the
username should be made a session variable.I would like to access
different pages/screens using this session variable.
In the logout screen I would like to destroy the session and the session
variable so that to access any of the screens directly(by typing the URL)
,it checks for the session variable and since it is null should redirect
to the login screen.
I would also like to set a session timeout i.e for how long the session
remains active before expiring.
If possible please send a sample code.
please reply,
thanks in adv,
kishor