Re: Need Some Direction
| From: | Torsten Roehr | Date: | Thu, 05 Aug 2004 15:09:46 +0000 |
| Subject: | Re: Need Some Direction | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-192875@lists.php.net to get a copy of this message | ||
"Aaron Todd" <aaloki88@hotmail.com> wrote in message
news:20040805144235.91200.qmail@pb1.pair.com...
> Hello,
>
> I am trying to build up a members only site, but I need some direction.
So
> far I have written a page that will let a user register for access. That
> script emails me their info so I can validate it, sends them a "thankyou"
> email and then sends the data to a temporary MySQL database table. In the
> email that I get I created two links. One will send the user an
acceptance
> email and put their info in a final database table. The other will send
the
> user a Deny email and will delete their info from the temporary database
> table.
>
> I have also created a login script that will ask for a username and
password
> and verify it with the database. If its all correct then it will redirect
> you to a restricted page.
>
> The direction I need is how do I go about restricting access to the
members
> only pages? I have been reading up on sessions, which I think will be a
> cool addition to this site, but I still havent found much on restrictin
> access without a username and password. Currently my login and
registration
> pages are located in the root of the domain. The all the members only
pages
> are in a directory called /members/.
>
> Can anyone give me some direction on how I should go about all this.
>
> Thanks,
>
> Aaron
Hi Aaron,
you might want to take a look at PEAR's LiveUser:
http://pear.php.net/package/LiveUser
Takes a bit of time to set up but should be exactly what you are looking
for. It handles user authentication (login), session timeout and user
rights.
Regards, Torsten Roehr