登录页面代码下面这个,表admin里有 admin,absd,zhangyu,chengjiang这些用户,怎么样他们登陆时让他们进入不同的页面,比如admin进入页面1,absd进入页面2,zhangyu进入页面3,chengjiang进入页面4
<%
dim name,password
name=request.form("name")
password=request.form("password")
dim exec,conn,rs
exec="select *from admin where(name='"&name&"' and password='"&password&"')"
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("../sandan.mdb")
set rs=server.createobject("adodb.recordset")
rs.open exec,conn
if not rs.eof then
rs.Close
conn.Close
session("checked")="yes"
session("check")="right"
response.Redirect "index.asp"
else
session("checked")="no"
session("check")="wrong"
response.Redirect "login.asp"
end if
%> |