0

I am trying to create a project that involves two roles say admin and student is it Ok to provide two radio button and then checking out which role a user select and then upon selection perticular page is constructed ?? Is my approach wrong ? what would you suggest??

Vishal Sharma
  • 2,773
  • 2
  • 24
  • 36

2 Answers2

0

Why ask for the user to choose a role? based on the role, load the page.

Shoban
  • 22,920
  • 8
  • 63
  • 107
0

Your application must be simple to navigate through. Try to minimize the user interaction as much as possible. Wherever you can calculate the users need, do it. Here, provide a login page with a username and password entries only. You can then check whether that user exists in the database. If yes, check which role he belongs to, and redirect him to the page corresponding to his role.

Jomoos
  • 12,823
  • 10
  • 55
  • 92
  • means this approach is bad.... now say i have two tables 1 for admin and1 for student. so how i check a single textbox for both of tables? – Vishal Sharma Feb 06 '12 at 09:23
  • 1
    See [this](http://stackoverflow.com/a/6417740/851432) and [this](http://stackoverflow.com/q/5481155/851432). I suggest you the following design. First table: `login_info` contains `userid`, `username`, `password`, and `usertype`(normal user or admin or some other user). Then a `user_info` table with `user_id`, `name`, `email`, etc., – Jomoos Feb 06 '12 at 09:40