Protecting a page specific to a password

Started by therockwwe, November 23, 2007, 02:48:17 AM



I got the script running, and its absolutly great!!

What I have is when each user logs in they are re-directed to thier specific page

For example when John logs in he goes to John.php, when Joe logs in he goes to Joe.php, etc

At the moment when John logs in he will be able to get to Joes page (if he knows the path)

Am I able to stop this from happening? (so only John can see his page), so the page is only accessible by a specific username and password

All your help has been wonderful

Thank you


Advanced Password Protector cannot do that by itself. It is designed to protect URLs which is available to ALL members from the list.

But i believe this can be accomplished by combining it with simple password protect script.  You'll have to create a copy of that simple password_protect.php for each user.

For example you want to protect these pages:

You have setup advanced password protector so users can login, and they will be redirected to appropriate page. Now you have to check if user has permissions to see that very page.

Download password protect script, and copy it 3 times (so each page would have its own password_protect.php)
so you may have these (names are not important, name as you wish):
password_protect_john.php - edit script code to set allowable usernames/passwords for john (multiple allowed)
password_protect_stacey.php - edit script code to set allowable usernames/passwords for stacey (multiple allowed)
password_protect_marry.php - edit script code to set allowable usernames/passwords for marry (multiple allowed)

Now you'll have to reference those password_protect_*.php in files being protected (see password protect example) on how to setup it correctly. So gets protected with password_protect_john.php gets protected with password_protect_stacey.php

As a result, users will login in advanced password protector, and will be redirected to appropriate page. That page will be additionally protected with simple password protector which will check for its own username/password. User will see page if username/password correctly entered, and if do not match - login form would appear.


zubrag , you are AWESOME!!!

This is such an awesome script


THANK YOU!!! THANK YOU!!! THANK YOU!!! I'm sooooo glad i looked at the very last topic of the very last page here! i almost gave up!!! Is there a place to donate???

Update: it is