Re: User validation and Session management
| From: | Justin French | Date: | Tue, 26 Mar 2002 00:36:16 +0000 |
| Subject: | Re: User validation and Session management | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-90125@lists.php.net to get a copy of this message | ||
There is a pretty good tutorial on a simular topic on Site Point... it deals
with restricting SOME pages of a website, and would be reasonably easy to
adapt to work with a permissions table -- although I'd keep the user_id in a
session, and check if *THIS USER* has permission for *THIS PAGE*, rather
than checking if *THIS SESSION* has permission.
http://www.WebmasterBase.com/article/319
It depends how you want to structure your permissions, but I've got a few
ideas on how to extend/modify the code to suit your needs -- feel free to
contact me off list.
I used this tutorial and code base as the basis of my own session management
and user login stuff, which is functioning well.
Note: it does use cookies, which you may or may not consider an issue.
Justin French
--------------------
Creative Director
http://Indent.com.au
--------------------
on 26/03/02 1:42 AM, javier (javier@leeloo.mine.nu) wrote:
> I would like to know how can I do with php to keep user track
> and let him or not access to specified pages.
>
> I thought about validating (u/p) first and then giving a session
> variable. And then on each script I would check sessionID with
> a permissions table.
>
> Is there any tutorial that talk about above?