Click here to Skip to main content
15,915,093 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have user management in my website in which i have the administrators and simples users administrators can simple manage the website e.g add and delete users , products e.t.c.. and users can simply buy proudcts.. by signing in..

i am doing this task using session.. i just want to add roles in my web site so i can make users administrators or users . how can we do it?? any artical on this please help??
Posted

1 solution

In your database make a separate table named Roles with Role and ID as columns,define roles here

Like admin with id 1
user with id 2 etc

In your userTable,make a column named RoleID and assign each user the roleID as per you want from Roles Table
 
Share this answer
 

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