ASP登陆验证请教
小弟刚学ASP 现在在登陆验证时遇到点问题,想向各位请教下
<%
Set conn = Server.CreateObject("ADODB.Connection")
connstr = "driver={sql server};server=CRABS\TSYS;database=add;uid=sa;pwd=1"
conn.open connstr
set rs=server.CreateObject("ADODB.Recordset")
tid=Request.form("iid")
tname=Request.form("iname")
sqlcheck="select b_id,b_name from book where b_id='"&tid&"' and b_name='"&tname&"'"
set rs1=conn.Execute(sqlcheck)
if not rs1.EOF then
if rs1("b_id")=tid then
if rs1("b_name")=tname then
NextPage="index.asp"
else
NextPage="login.asp?Error=密码输入错误!"
end if
else
NextPage="login.asp?Error=非法操作!"
end if
else
NextPage="login.asp?Error=没有该用户!"
end if
rs1.close
conn.close
response.redirect(NextPage)
%>
这样在登陆时老是出现没有该用户。。也不知道是出错在哪,望能指教下,不胜感激