Y
yang_ysb
Unregistered / Unconfirmed
GUEST, unregistred user!
<% @ language = VBScript %>
<% Response.Buffer =True%>
<html>
<body>
<% Session("allow"=True %>
<%
UserName=Request.Form("username"
password=request.Form("password"
'获取用户输入的用户名和密码
datafile="TTBGuanLi_ysbaxp.mdb"
set MyConn=server.createobject("adodb.Connection"
MyConn.Open "DRIVER={Microsoft Access Driver (*.mdb)};
data sourc= "
&
server.mappath(""&
datafile &""/////////////就是里有错呀!!帮忙谢谢了!!
SQL="Select * from tbilogin"
Set Rs =server.createobject("adodb.recordset"
Set Rs=MyConn.Execute(SQL)
If UserName=Rs("UserName" AND Password=RS("Password" then
'if there is a match then
show the page
%>
<hl>Hello World</hl>
<%
else
Response.Redirect "http://10.0.0.3/Samples/login.asp"
RS.Close
MyConn.Close
Set RS=Nothing
Set MyConn=Nothing
end if
%>
'if there was no match then
make the visitor try again to login.
</body>
</html>
<% Response.Buffer =True%>
<html>
<body>
<% Session("allow"=True %>
<%
UserName=Request.Form("username"
password=request.Form("password"
'获取用户输入的用户名和密码
datafile="TTBGuanLi_ysbaxp.mdb"
set MyConn=server.createobject("adodb.Connection"
MyConn.Open "DRIVER={Microsoft Access Driver (*.mdb)};
data sourc= "
&
server.mappath(""&
datafile &""/////////////就是里有错呀!!帮忙谢谢了!!
SQL="Select * from tbilogin"
Set Rs =server.createobject("adodb.recordset"
Set Rs=MyConn.Execute(SQL)
If UserName=Rs("UserName" AND Password=RS("Password" then
'if there is a match then
show the page
%>
<hl>Hello World</hl>
<%
else
Response.Redirect "http://10.0.0.3/Samples/login.asp"
RS.Close
MyConn.Close
Set RS=Nothing
Set MyConn=Nothing
end if
%>
'if there was no match then
make the visitor try again to login.
</body>
</html>