Zubrag.com
January 22, 2018, 02:08:00 PM *
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: password_protect.php: how to have multiple password protected pages  (Read 3043 times)
conover
Newbie
*
Posts: 1


« on: April 13, 2015, 11:51:45 PM »

I am using password_protect.php to password protect some pages on my site.  I want to have different passwords for each page. The first page works fine, but the second one does not. The php files are located in different folders. Any idea what I might be doing wrong?
Thanks.

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


WWW
« Reply #1 on: April 17, 2015, 02:43:04 AM »

password_protect serves to restrict access to multiple pages, similar to how you use one user/password to login to your operating system and see everything that is there.

To have separate password for each page - you can create separate copy of password_protect.php for each page you want to protect, and use specific password there.

Example:
password_protect1.php will have user1/password1 and you add path to this file in your webpage1
password_protect2.php will have user2/password2 and you add path to this file in your webpage2
...

this way each page will be protected with its own set of passwords
Logged
nathanhollis
Newbie
*
Posts: 1


« Reply #2 on: August 22, 2016, 10:56:18 AM »

password_protect serves to restrict access to multiple pages, similar to how you use one user/password to login to your operating system and see everything that is there.

To have separate password for each page - you can create separate copy of password_protect.php for each page you want to protect, and use specific password there.

Example:
password_protect1.php will have user1/password1 and you add path to this file in your webpage1
password_protect2.php will have user2/password2 and you add path to this file in your webpage2
...

this way each page will be protected with its own set of passwords

You are right. what you are doing sounds okay to me. I would also clear cache if it still doesn't work. My most of the problems solves when I refresh and restart browsers. Minor thing but solves problem most of the time.
Logged
Pages: [1]
  Print  
 
Jump to:  

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