新发现
MAIN.HTML
DS TutorialTUTORIAL
BY MATTHEW MCGURK
LOGIN.ASP
<%@ Language=VBScript %>
<% Response.Buffer = True %>
<%
Username = Request.Form("Username")
Password = Request.Form("Password")
Set myConn=Server.CreateObject("ADODB.Connection")
' DSN Connection String
' myConn.Open "login"
'DSN-Less Connection String
myConn.Open = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("login.mdb")
SQL = "Select * From tblLogin"
Set RS = MyConn.Execute(SQL)
If Username = RS("Username") AND Password = RS("Password") Then
Session("allow") = True
%>
THE USERNAME
AND PASSWORD YOU ENTERED HAVE BEEN VERIFIED
TUTORIAL BY DataStream USA
<%
Else
Response.Redirect "main.html"
RS.Close
myConn.Close
Set RS = Nothing
Set MyConn = nothing
End If
%>