5
Answers

Problem: Login with admin rights

Photo of Dorothy

Dorothy

18y
2.2k
1
I’m doing a login page using C# and my login works perfectly fine, one problem though is that I want to check if the person logged in has administrative rights or not so that I can direct them to a correct page. If for example Dorothy logged in I must direct her to an admin page. When I do my select statement I get different errors, can someone pls help with the correct SQL statement? I have three tables:            


tblUser
UserId Username Password
1001 Dorothy 12345
1001 Jane 78965

tblRole
RoleId RoleDescription
1111 Administrator
1112 Floor Manager
1113 Sales Director

tblUserRolelink
UserId RoleId
1001 1111
1001 1113

Answers (5)