login.asp问题

来源:百度知道 编辑:UC知道 时间:2024/05/01 10:20:50
<!-- #include file="const.asp" -->
<!-- #include file="md5.asp" -->

<%
dim sql
dim rs
dim userID
dim userpassword
userID = trim(request.form("userID"))
userpassword = trim(request.form("userpassword"))

if(userID = "" or userpassword = "") then
alert("对不起,您全部填写,请查实!")
GoBack()
Response.end
end if

sql = "select * from [User] where sUserName = '" & userID &_
"' and sPassword = '" & userpassword & "'"
set rs = ExecuteQuery(sql)
if not(rs.bof and rs.eof) then
alert("对不起,您输入的用户名或者密码错误,请查实!")
GoBack()
Response.end
else
Session("userID") = userID

Response.Redirect("index.htm")
end if

%>
为什么在使用后不管输入什么,都只说对不起,您全部填写,请查实!

就这样,恩,那样,恩你说呢?

if(userID = "" or userpassword = "") then
alert("对不起,您全部填写,请查实!")
GoBack()
Response.end
end if

if userID="" then
alert("对不起,您全部填写,请查实!")
GoBack()
Response.end
end if

if userpassword="" then
alert("对不起,您全部填写,请查实!")
GoBack()
Response.end
end if