name=request.form("UserName")
psw=request.form("UserPassword")
if name="" or psw="" then
response.Write("<script language=javascript>alert('请填写完整!');history.go(-1)</script>")
end if
sql="SELECT * FROM company WHERE name='" & Replace(name,"'","''") & "' and psw='" & Replace(psw,"'","''") & "'"
set rs=conn.execute(sql)
if rs.bof or rs.eof then
response.write "<script language=javascript>"
response.write "alert('用户或密码不对!');"
response.write "javascript:history.go(-1);"
response.write "</script>"
else
response.write"登陆成功"
if rs("UserClass")="A" then
response.redirect"
http://www.baidu.com.cn
" ///如果级别等于A elseif rs("UserClass")="B" then
response.redirect"
http://www.sina.com.cn
" ///如果级别等于B else
response.redirect"
http://www.163.com
" ///如果级别等于C end if
%>
出现
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/bbs/asp.asp,行 33