how to assign roles to users in Database ?
mean i have admin, applicant ? so how could i differentiate bw them ?
HELP !!!

First, what is the database platform? MSSQL, MySQL, etc?

its MSSQL platform.

Hello akkbkht,

From what i understand, you can do this by having, for example, a MEMBER_ROLE table e.g

roleID | roleName | Description
  1      Admin      Administrator
  2      Applicant  bla bla bla

and ofcourse, you have a member table..

memberID | firstName | lastName | roleID(fk)
 1         Beautiful    You         2
 2         akkbkht      Daniweber   1

Then you could write your queries to suit this...e.g
check this member with memberid 2, is he an admin? if yes, allow access somewhere, else, deny.
Hope this helps you.

Regards,
Seslie

ahaaan !!! Thanks alot dear users !!! its clear to me now !!!
@Seslie

one more thing , on front end i have two SignUps, 1 for applicant and one for sub-Admin of different hotels !!!
store procedure will directly assign ID=1 (Role) for applicant but what i should do for admin ? mean he/she would have to wait for that (mean role have to be assigned by Su?per Admin) ? or what ?

one more thing , on front end i have two SignUps, 1 for applicant and one for sub-Admin of different hotels !!!
store procedure will directly assign ID=1 (Role) for applicant but what i should do for admin ? mean he/she would have to wait for that (mean role have to be assigned by Su?per Admin) ? or what ?

@Hunain I think u got your answer now....

@seslie. Thanks alot. That's it. You have solved my issue. Once again thanks a lot for all your help.

Glad I could help. You're very welcome.

@akkbkht : yes aamir i got it !!!

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.