Password Protection...
Posted: Tue Oct 07, 2003 10:32 pm
Hi!
I am making a content management system that uses mysql.
When they go to view a page, it looks like this:
index.php?page=Home
index.php?page=Home/Search
index.php?page=Home/Search/About
And in the mysql database, it looks like this:
id :: path :: title :: password :: passwords
1 :: 1 :: Home :: Yes :: password1, password2
2 :: 1/2 :: Search :: No ::
3 :: 1/2/3 :: About :: No ::
Now Search is a subcategory to Home and About is a sub-subcategory to Home. Understand?
Now, I want to make home password protected which is easy because I just put Yes in password and them add the passwords. Then I just write a simple script that makes sure users login before viewing.
But what my problem is, is making the sub categories of Home password protected aswell, using the same passwords as Home without having to go in and add the passwords manually.
Understand? How can I do this?
Thanks,
Ben
I am making a content management system that uses mysql.
When they go to view a page, it looks like this:
index.php?page=Home
index.php?page=Home/Search
index.php?page=Home/Search/About
And in the mysql database, it looks like this:
id :: path :: title :: password :: passwords
1 :: 1 :: Home :: Yes :: password1, password2
2 :: 1/2 :: Search :: No ::
3 :: 1/2/3 :: About :: No ::
Now Search is a subcategory to Home and About is a sub-subcategory to Home. Understand?
Now, I want to make home password protected which is easy because I just put Yes in password and them add the passwords. Then I just write a simple script that makes sure users login before viewing.
But what my problem is, is making the sub categories of Home password protected aswell, using the same passwords as Home without having to go in and add the passwords manually.
Understand? How can I do this?
Thanks,
Ben