Okay, I still can't seem to get it to work. Let me show you all my script and hopefully someone out there in ASP land can figure out what is wrong.
admin_login.asp
<html>
<head>
<title>Admin Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p align="center">
<br>
<br>
<font face="Bookman Old Style" size="5">Administration Login</font><br>
<br>
</p>
<form name="Login" method="post" action="check_admin_user2.asp">
<table width="273" border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC">
<tr>
<td align="right" height="47" valign="bottom" width="94">User name: </td>
<td height="47" valign="bottom" width="172">
<input type="text" name="txtAdminUserName" size="20">
</td>
</tr>
<tr>
<td align="right" width="94">Password: </td>
<td width="172">
<input type="password" name="txtAdminUserPass" size="20">
</td>
</tr>
<tr>
<td align="right" height="44" width="94"> </td>
<td height="44" width="172">
<input type="submit" name="Submit" value="Enter">
<input type="hidden" name="txtAdminAccess" value=3>
<input type="reset" name="Submit2" value="Reset">
</td>
</tr>
</table>
</form>
<br>
<center>
Session Cookies must be enabled<br>
<br>
</center>
</body>
</html>
check_admin_user2.asp
<%
Dim adoCon
Dim strCon
Dim rsCheckAdminUser
Dim strAccessDB
Dim strSQL
Dim strAdminUserName
strAdminUserName = Request.Form("txtAdminUserName")
strAccessDB = "../********/**************.mdb"
Set adoCon = Server.CreateObject("ADODB.Connection")
strCon = "DRIVER={Microsoft Access Driver (*.mdb)};pwd=****; DBQ=" & Server.MapPath(strAccessDB)
adoCon.Open strCon
Set rsCheckAdminUser = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT tblAdminUsers.Access, tblAdminUsers.Password FROM tblAdminUsers WHERE tblAdminUsers.UserID ='" & strAdminUserName & "'"
rsCheckAdminUser.Open strSQL, strCon
If NOT rsCheckAdminUser.EOF Then
If (Request.Form("txtAdminAccess")) = rsCheckAdminUser("Access") Then
If (Request.Form("txtAdminUserPass")) = rsCheckAdminUser("Password") Then
Session("AdminUserGood") = True
Set adoCon = Nothing
Set strCon = Nothing
Set rsCheckAdminUser = Nothing
Response.Redirect"admin.asp?name=" & strAdminUserName
End If
End If
End If
Set adoCon = Nothing
Set strCon = Nothing
Set rsCheckAdminUser = Nothing
Session("AdminUserGood") = False
Response.Redirect"unauthorized_admin.htm"
%>
<head><title>Check Admin ID</title></head>
The three fields in my database for tblAdminUsers are:
UserID - text
Password - text
Access - number
For the love of god, please someone help me. 