市二医院预约:我写的登陆页面,不知道哪里问题,运行不了

来源:百度文库 编辑:高校问答 时间:2024/05/03 13:06:26
<!--#include file="conn.asp"-->
<%
dim user,userpass,rs,sql
user=lcase(trim(request.Form(username)))
userpass=trim(request.Form(password))
if user="" then
response.write "<script>alert('用户名不能为空!');history.go(-1);</script>"
response.End()
end if

if userpass="" then
response.write "<script>alert('密码不能为空!');history.go(-1);</script>"
response.End()
end if

sql="select * from person where username='"&user&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
if rs("password")=userpass then
session("login")=true
session("UID")=rs("ID")
session("uname")=rs("name")
session("score")=rs("score")
session("username")=rs("username")
session("password")=rs("password")
rs.close
set rs=nothing
response.redirect "huiyuan.asp"
else
response.write "<script>alert('用户名和密码不能不配比!');history.go(-1);</script>"
response.End()
end if

end if
rs.close
set rs=nothing
%>
麻烦哪位兄弟,帮小弟看一下,急!谢谢!

怎么帮你检测呀!!!!就发了怎么一点。 说不定是你其他的SAP 出错~~~~~~~~~~~~~`

想找让帮你 把后台 密码。。。。所有的东西说出来。.......

if not(rs.eof and rs.bof) then
不要()括号
if not rs.eof and rs.bof then