I am designing a Library website, and I have two table Libarian and Student table so when the Libarian login should have access to all the database(Adding new record, updating and all) but when the student login should only view the database without changing anything, so What I want to know is how do I read from those two tables and see who has logged in so that I can provide him/her with suitable information, I understand that I need to read from both tables everytime a person login then determine if the person is a student or a Librarian then give the person the access s/he deserves in the website

I hope that makes sense

Design two pages : one for librarian and another for student. Configure Form authentication & authorization.

I dont think thats gona work coz this is gona be online website, so I will only have one login page for everyone coz there is gona be no way to determine who clicked the login button now between the librarian(who is responsible for the database and signing in and out the books) and the student who is gona browse thru the database checking if the books s/he needs are available and reserving them if they are not

Where are you storing the log on details? Just hold all the logon information in on table e.g.

UID
Username
Password
AccessLevel

Create a different access level for librarians and students
and when the user logs in, depending on what their access level is you can allow/deny access to pages and so on.

aren't you making it mandatory for the student to login to the site before browsing through the lists ?

No, The student can reserve a book which is on loan so to do that the student needs to login, otherwise they can browse for books without logging in, sometimes there are articles or journals which are exclusively for members of the library

if you know what I mean so what I need is a sample code to do that or maybe just a clue on where to start

This article has been dead for over six months. Start a new discussion instead.