Click here to Skip to main content
15,392,261 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to create User, Admin and Super admin login form in using sql server?

I have to create a web application, and it contains 3 types of login.
1. User login
2. Admin login
3. Super Admin login

Where "Admin" will have access to delete the "User" similarly "Super Admin" has right to delete "Admin" details but its not possible to vice versa.

Please suggest me what approrch should follow to do the same.

Aditya Kumar
[no name] 9-Oct-15 0:43am
As you have 3 types of user, you have to store UserType in your DB. Let me explain:

User - 1
Admin - 2
SuperAdmin - 3

Here 1,2,3 are UserType value in your Database. So you need to one column UserType in user info table.

When a user will login fetch this(UserType) value in Session/Cookie whatever you are using now in your project.

As per UserType value user can see other user's info and delete them.
Aditakumar2311 16-Dec-15 10:28am
Thank you Manas.
John C Rayan 9-Oct-15 7:09am
I would suggest to go for role based user access control which is much more flexible.
Aditakumar2311 16-Dec-15 10:28am
Thanks John

1 solution


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900