[求助]ASP编写验证代码无效
<!--#include file="conn.asp"--><%dim passpost,numpost,num,pass
passpost=request.form("password")
numpost=request.form("number")
set loginfo=server.createobject("adodb.recordset")
passinfo="select * from userinfo where number='"&numpost&"'"
loginfo.open passinfo,conn,1,3
if loginfo.eof or loginfo.bof then
response.write "学号输入有误或数据库中没有你的记录,请<a href=vbscript:history.back()>返回</a>"
else
if passpost<>loginfo("password") then
response.write "您输入的密码有误,请<a href=vbscript:history.back()>返回</a>重新输入"
else
response.cookies("number")=numpost
response.cookies("password")=passpost
response.redirect("statistics.asp")
end if
end if
%>
为什么这段代码不能验证密码?既使我输入错误的密码,照样可以进入页面statistics.asp,请问哪里出现了问题????