I am using an access db with asp, the db is named patriots.mdb and table is named Users
what I have been attempting to do is pass 3 form entries from this page:
<form action="verifymeaction.asp" name="frmVerify" method="post">
<input name="UserName" type=text size=30 maxlength=20>
<input name="Password" type=text size=30 maxlength=26>
<input name="Pin" type=text size=30 maxlength=26>
<INPUT TYPE="Submit" VALUE="Submit" name="Submit">
</form>
the page verifymeaction.asp
So basically user enters the three form entries and hits submit
The form info goes to verifymeaction.asp
The verifymeaction.asp page locates a record that has all 3 or these items, not just one, all three.
If it has all three, it then what it does is updates the field named FVerify to TRUE for the record that matched all 3
(it is a yes/no checkbox in the access db
If it can't find all three in their respective fields, it goes to whatever.asp
Here is the wreck of code I have been trying to make work, sorry it is so messed up, if you want to just re-write it go ahead, but I am posting my work so you know I am not just looking for an easy way out, I have been trying to make this work for a couple hours, keep in mind I am still learning ;)
All I ask is that the db connection is left the same as I use it in several other pages.
<%
sFile = request.ServerVariables("PATH_TRANSLATED")
sSplit = split(sFile, "\")
for iCtr = 0 to uBound(sSplit) - 1
sDir = sDir & sSplit(ictr) & "\"
next
Dim objConn
set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & sDir & "patriots.mdb"
%>
<%
Dim rsUsers, uname, upin
set rsUsers = Server.CreateObject("ADODB.Recordset")
rsUsers.Open "Users", objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable
'rsUsers.Filter = "FPin = " & Request.Form("Pin")
uname = Request.Form("Username")
'rsUsers.Filter = Request.Form("Username")
rsUsers.Source = "SELECT (FUsername) FROM Users WHERE FUsername = 'uname' ORDER BY FUsername ASC"
'If Request.Form("Pin") = rsUsers("FPin") AND Request.Form("Username") = rsUsers("FUsername") Then
' rsUsers("FVerify") = True
' rsUsers.Update
' Response.Redirect "updated.asp"
'Else
'Response.Redirect "sorry.asp"
Response.Write "" & upin & ""
Response.Write "" & uname & ""
Response.Write rsUnique("FUsername")
'End If
rsUsers.Close
set rsUsers = Nothing
objConn.Close
set objConn = Nothing
%>