登录验证问题
大家帮忙看看,我一直找不到问题,纠结啊。。。<%
dim Nick,Password
Nick=Request.Form("Nick")
Password=Request.Form("Password")
set conn=Application("conn1")
set rs=Application("rs1")
sql="select UserID,Passw from Users where Nick='"&Nick&"'"
rs.Open sql,conn,0,1
if rs.BOF and rs.EOF then
rs.close
set rs = nothing
str1="<script>alert('登录名不存在!');history.back();</script>"
Response.Write str1
elseif rs("Passw")<>Password then
rs.close
set rs = nothing
str1="<script>alert('密码错误!');history.back();</script>"
Response.Write str1
else
session("Nick")=Nick
session("UserID")=rs("UserID")
rs.close
set rs=nothing
Response.Redirect "default.htm"
end if
%>
连上数据库,已经注册了一个帐号,可是老报密码错误,我密码没错额
[ 本帖最后由 wemf 于 2013-2-3 20:50 编辑 ]