I have an .asp file I want to check a username and password with, matching it to an SQL Database. The .asp file reads like this:
<%Language=VBScript%>
<%Option Explicit%>
<%
Dim cn, rs, cnString, UserName, PWord
Set rs = Server.CreateObject("ADODB.RecordSet"
cnString = "Driver=SQL Server;uid=sa;pwd=;Server=RobHome;Database=Test"
%>
<%
Sub VerifyClient()
Request.QueryString("UserName"
Request.QueryString("PWord"
sql = "Select * from ClientDB Where UserID = '" & UserName & "'" & "And Password = '" & PWord & "'"
rs.Open sql, cnString
If rs.BOF = True and rs.EOF = True Then
Window.Alert("NO"
Else
Window.Alert("Yes"
End If
End Sub
%>
How do I go about calling this from the page where the UserName and PassWord are entered? Rob
Just my $.02.
<%Language=VBScript%>
<%Option Explicit%>
<%
Dim cn, rs, cnString, UserName, PWord
Set rs = Server.CreateObject("ADODB.RecordSet"
cnString = "Driver=SQL Server;uid=sa;pwd=;Server=RobHome;Database=Test"
%>
<%
Sub VerifyClient()
Request.QueryString("UserName"
Request.QueryString("PWord"
sql = "Select * from ClientDB Where UserID = '" & UserName & "'" & "And Password = '" & PWord & "'"
rs.Open sql, cnString
If rs.BOF = True and rs.EOF = True Then
Window.Alert("NO"
Else
Window.Alert("Yes"
End If
End Sub
%>
How do I go about calling this from the page where the UserName and PassWord are entered? Rob
Just my $.02.