在check中当验证通过后在sql语句下就用session("变量名")进行保存用户名,密码
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open "SELECT * FROM 表 WHERE [name]='"&strusername&"' AND [pwd]='"&strpassword&"'", objConnection
If Not rs.Eof Then
session("name")=rs("name")
session("pwd")=rs("pwd")
Response.Redirect("***.asp")
else
response.write "<SCRIPT>alert ('您的权限不够,请与管理员联系!');parent.location='javascript:history.go(-1)'</SCRIPT>"
end if
rs.Close
Set rs=Nothing
温馨提示:答案为网友推荐,仅供参考