Zubrag.com
October 17, 2018, 01:52:43 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Protecting a page specific to a password  (Read 11783 times)
therockwwe
Newbie
*
Posts: 7


« on: November 22, 2007, 06:48:17 PM »

Hi

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

Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #1 on: November 23, 2007, 04:32:33 AM »

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:
http://example.com/members/john.php
http://example.com/members/stacey.php
http://example.com/members/marry.php

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
http://example.com/members/john.php gets protected with password_protect_john.php
http://example.com/members/stacey.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.
Logged
therockwwe
Newbie
*
Posts: 7


« Reply #2 on: November 23, 2007, 05:14:06 PM »

zubrag , you are AWESOME!!!

This is such an awesome script
Logged
trin
Newbie
*
Posts: 3


« Reply #3 on: October 29, 2009, 09:23:30 PM »

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 http://www.zubrag.com/donate.php
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC