Extract role from database based on credentials by user
Hi,
I want to extract roles from database and redirect user to other page based on the role i extract after user logs in.
So if role is admin then he will be redirected to some page and if role is user he will be redirected to some other page.
My question is how to write select query where i will compare username and password provided by user.
Thanks in advance for help