i want to create a login page for admin anduser.suppose admin is login access to all pages.But user is login only display for user details page.so any idea give me.i want to related script

1; Set user type for user , ie , if type=0 -> admin user , and type=1 -> normal user
2; When a user login your site, check type of user and save it in a session variable.
3; Check the value of session variable, when each page load and set permission related to the value of session variable

i am new beginner for php.this is my first task.so u help me

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.