BLiZZaRD
11-15-2007, 10:34 AM
Perhaps the title is misleading, and for that I apologize, I am sure whay I am after, I am not sure what it is called or how to describe it in a title.
I have a page (page1.html) and on this page is a username and password box in PHP.
You enter the username and password and it takes you to a new folder (folder1/page2.html)
Page2.html checks the password entered, and if correct allows you to see page2.html. If you try to go directly to page2.html through the addy bar you get redirected and told to go to page1.html to enter the password.
All of that works and is fine. Now the problem. (please note this is NOT a log in scripting thing, just a file/folder protection thing). in /folder1/ I have 6 pages (page2.html through page7.html. If you know the address to page4.html currently you can go directly to it. I want to prevent this.
(Note I can NOT use .htaccess for this ONLY php) What I would like to do is if a visitor goes to any page in /folder1/ it checks if they know the password from page1.html (or which ever password I require at that time) either in the form of a pop up asking them to verify or some other means. I thought about session variables, but If the visitor was on page1.html last week, has cleared their cache, I don't want them to have to go back to page1.html to get to page4.html.
Any help on this will be amazing. I am at wit's end trying to figure this out.
I have a page (page1.html) and on this page is a username and password box in PHP.
You enter the username and password and it takes you to a new folder (folder1/page2.html)
Page2.html checks the password entered, and if correct allows you to see page2.html. If you try to go directly to page2.html through the addy bar you get redirected and told to go to page1.html to enter the password.
All of that works and is fine. Now the problem. (please note this is NOT a log in scripting thing, just a file/folder protection thing). in /folder1/ I have 6 pages (page2.html through page7.html. If you know the address to page4.html currently you can go directly to it. I want to prevent this.
(Note I can NOT use .htaccess for this ONLY php) What I would like to do is if a visitor goes to any page in /folder1/ it checks if they know the password from page1.html (or which ever password I require at that time) either in the form of a pop up asking them to verify or some other means. I thought about session variables, but If the visitor was on page1.html last week, has cleared their cache, I don't want them to have to go back to page1.html to get to page4.html.
Any help on this will be amazing. I am at wit's end trying to figure this out.