0

I have a password protection for my website. The LogIn name and passwords are stored in a mysql database.
My question is: How can I define that a person who has a LogIn can only see some pages of the whole website? How can I connect the information about which pages the user is allowed to see with its LogIn information? In mysql as well as in my php programmed website?

4
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by phper
0

Just check to see if they are logged in on the pages they can only see when logged in. A simple cookie check can do this.

0

i think what you're talking about are called 'permissions'. you want certain users to have perission to only certain pages. i'm not sure how to do this, as i've never done it myself. but i would start with handling 'sessions'. check 'em out. www.php.net/session

0

You could maybe add new columns to the database. eg.

username, password, section 1, section 2, section 3.

Where section 1, 2, 3 would define different levels of access. If the user were allowed access to section 2 the value stored in the database could be 1. If they weren't allowed then you could put a value of 0.

Hope this helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.