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)};
DBQ= "
&
server.mappath(""&
datafile &""
SQL="Select * from tbiLogin"
Set RS = MyConn.Execute(SQL)
///////////////////////////////////下面这段只能是查到第一个用户/////
///我想要能够查到多个用户的////怎么改呀????
If UserName=Rs("UserName" AND password=RS("Password" then
'if there is a match then
show the page
%>
<hl>您好! ~<%=RS("name"%>~ 您以经成功登陆阿天数据管理系统!</hl>
<hl>您的身份是:<%=rs("jibie"%></hl><br>
<hl>您上次登陆的时间是:<% =RS("pretime" %> </hl><br>
<%
else
Response.Redirect "http://localhost/Samples/index.asp"
RS.Close
MyConn.Close
Set RS=Nothing
Set MyConn=Nothing
end if
%>
</body>
</html>
///////这样改对不对呀////
do while not RS.EOF
If UserName=Rs("UserName" AND password=RS("Password" then
%>
<hl>您好! ~ _<% =RS("name" %>_ ~ 您已经成功登陆阿天数据管理系统!</hl>
<hl>您的身份是:<% =RS("jibie" %> </hl><br>
<hl>您上次登陆的时间是:<% =RS("pretime" %> </hl><br>
<%
exitdo
else
i=1
end If
Rs.movenext
loop
If i=1 then
Response.Redirect "http://localhost/Samples/index.asp"
RS.Close
Conn.Close
Set RS=Nothing
Set Conn=Nothing
end if
%>
</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)};
DBQ= "
&
server.mappath(""&
datafile &""
SQL="Select * from tbiLogin"
Set RS = MyConn.Execute(SQL)
///////////////////////////////////下面这段只能是查到第一个用户/////
///我想要能够查到多个用户的////怎么改呀????
If UserName=Rs("UserName" AND password=RS("Password" then
'if there is a match then
show the page
%>
<hl>您好! ~<%=RS("name"%>~ 您以经成功登陆阿天数据管理系统!</hl>
<hl>您的身份是:<%=rs("jibie"%></hl><br>
<hl>您上次登陆的时间是:<% =RS("pretime" %> </hl><br>
<%
else
Response.Redirect "http://localhost/Samples/index.asp"
RS.Close
MyConn.Close
Set RS=Nothing
Set MyConn=Nothing
end if
%>
</body>
</html>
///////这样改对不对呀////
do while not RS.EOF
If UserName=Rs("UserName" AND password=RS("Password" then
%>
<hl>您好! ~ _<% =RS("name" %>_ ~ 您已经成功登陆阿天数据管理系统!</hl>
<hl>您的身份是:<% =RS("jibie" %> </hl><br>
<hl>您上次登陆的时间是:<% =RS("pretime" %> </hl><br>
<%
exitdo
else
i=1
end If
Rs.movenext
loop
If i=1 then
Response.Redirect "http://localhost/Samples/index.asp"
RS.Close
Conn.Close
Set RS=Nothing
Set Conn=Nothing
end if
%>
</body>
</html>