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
Extract role from database based on credentials by user
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Akhil GargRank #772 · 3K reputationPosted Jan 20, 2015, 9:49 PM EST
Select dbo.Role from Users Where password=@inpasswordif user exists it will return role else it will not return anything