#12004/10/23 14:39:13
index.asp:
<HTML>
<head><title>登陆页</title>
</head>
<body>
<form method="post" action="do_login.asp">
用户名:<input type="text" name="x1" value=""><br>
密码: <input type="password" name="x2" value=""><br><br>
<input type=submit value="登陆" name="r">
<input type="reset" value="重置">
</form>
</body>
</HTML>
do_login.asp:
<script language="vbscript">
var strUserID = Request("txtUserID" )(1)
dim id,pw
id=request.form("x1" )
pw=request.form("x2" )
Session("username" ) = strUserID
set rs = Server.CreateObject("ADODB.Recordset" )
rs.Open "Select * from people","DSN=ql;"
do while not rs.eof
if id=rs("用户名" ) and pw=rs("密码" ) then
response.redirect "V6.ASP"
end if
rs.movenext( )
loop
rs.close
set rs=nothing
alter("用户密码错误!" )
</script>
就是第2个页面,运行有问题。。不能完成我向要的登陆。。
请教是哪里有问题?
谢谢。。
编辑历史:[此帖最近一次被 csdjyzd 编辑过(编辑时间:2004-10-23 14:47:32)]