Re: Authentication using session.
| From: | Justin French | Date: | Wed, 07 Aug 2002 07:49:31 +0000 |
| Subject: | Re: Authentication using session. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111479@lists.php.net to get a copy of this message | ||
This list doesn't work that way. If you want someone to write code for you,
you need to pay :)
However, usually you can find plenty of scripts that come *close* to what
you want, which will help you learn, and extend the code.
Then you'll be better informed to ask specific questions like "can I set the
time out of a session?"... questions in this form will always be answered by
the group, whereas "build my session code for me" will not.
Can I suggest starting with something like Kevin Yank's article on
webmasterbase.com (restricting page access with sessions I think it's
called) as a starting point, although it does have it's limitations, and
will need to be extended to suit your needs.
Good luck,
Justin French
on 07/08/02 4:34 PM, J.F.Kishor (kishor@ooty.tenet.res.in) wrote:
> 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
>
>
>
>
>