how do you redirect from a login page according to security level in access. I have my login page which checks for valid username and password, but how would you redirect according to a number in my access database. Here is code from page:
<%
'here is the connection string
'Set conn = server.createobject("adodb.connection")
Set adoCon = Server.CreateObject("ADODB.Connection")
'this connection uses JET 4 it is the prefered method of connecting to an access database
'DSNtemp = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("login.mdb")
'if you cant use JET then comment out the line above and uncomment the line below
'DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("wwwroot/login.mdb")
adoCon.Open "DSN=Employees"
'conn.Open DSNtemp
Set rsEmployees = Server.CreateObject("ADODB.Recordset")
'here we are getting the info from the login form
If InStr(Request.Form("uid"),"'") Then
uid = Replace(Request.Form("uid"),"'"," ")
Else
uid = Request.Form("uid")
End If
If InStr(Request.Form("pwd"),"'") Then
pwd = Replace(Request.Form("pwd"),"'"," ")
Else
pwd = Request.Form("pwd")
End If
'now we will querry the database for a match
strSQL = "Select * From users Where uid = '" & uid & "' And pwd = '" & pwd & "'"
rsEmployees.Open strSQL, adoCon
'if the user is found we will set the session okeydokey to TRUE allowing the user to gain entrance
If Not rsEmployees.EOF Then
session("login") = "TRUE"
session("loanofficer") = rsemployees("loanofficer")
'always always always destroy recordsets and close connections!
Set rsEmployees = Nothing
Set rsEmployees= Nothing
Set adoCon = Nothing
'since the user was found, we sent them toodling on to the next page
'################################################# ################################################## #####
'##### IN THE LINE BELOW CHANGE INDEX2.ASP TO THE PAGE YOU WANT THE USERS TO BE DIRECTED TO
Response.Redirect "search_form.asp"
Else
'ooops if we got this far they dont know their login info or arent in the database
'AGAIN always always always destroy recordsets and close connections!
Set rsEmployees = Nothing
Conn.Close
'so we send em back to try again
Response.Redirect "index.asp"
End If
%>
something like
If blank = rs("field') then
redirect blah.asp