hi ive searched all the forums etc and havent found an answer.
I'm using the asp login code and edited it to my own needs as im a propler newbie!
However, the example doesnt give an example of when you have in your
database a "user type" field. This is for the type of user that logs in
i.e admin or a normal user.
What i want it to do is if the user loging in is admin ,...they are
redirected to one page and if the user is a normal user they are
directed to another.
I've tried this sql
"SELECT user.password, user.type FROM
user WHERE user.username ='" & strusername & "'" |
basically all thats different here is that the "type" column is selected too. I then used this with:
'redirect
IF rsCheckuser("type") = "admin" THEN
Response.Redirect"successfulLogin.asp?name=" & strusername
ELSE
response.Redirect("staffframe.asp")
END IF
End IF
End If
|
i know its either a really simple modification or ive got it completely
wrong but ive spent sooo long on this i would be so grateful for any
help.
ps - basically all ive changed are a few variables to fit in with my
database, and the basic login and sessions worked fine with those.
btw if anyone want to help me out im ok if you use the original example coding and db.
rob
Edited by elbeardo - 21 February 2005 at 8:33pm