我在xh_login.asp输入用户名和密码,然后跳转到xh_cklogin.asp进行判断,根据用户的权限(用户表中的type)选择跳转到哪个新页面
但是输入了用户名和密码后却停在xh_cklogin.asp的空白页面上了,这是怎么回事啊?
请帮忙
xh_cklogin.asp代码如下
<!--#include file="xh_conn.asp"-->
<%
myAccount = trim(request("username"))
myPass = trim(request("Password"))
set Conn = Server.CreateObject("Adodb.Connection")
Connstr = "Driver={SQL Server};Server=cylong;UID=sa;PWD=;Database=生产管理"
Conn.open connstr
CheckSql = "SELECT * FROM 用户 WHERE 用户名 = '"&myAccount&"' AND 密码 = '"&myPass&"'"
set checkRs = Server.CreateObject("Adodb.Recordset")
checkRs.Open CheckSql,Conn,1,1
if checkRs.eof then
response.write "<script language=javascript>alert('对不起密码输入错误');history.back(-1)</script>"
end if
Select Case session("type")
Case "1"
response.redirect "1.asp"
Case "2"
response.redirect "2.asp"
Case "3"
response.redirect "3.asp"
end select
%>
谢谢
[此贴子已经被作者于2005-12-28 0:17:08编辑过]