先写一个登陆表单。假设reg.asp
西路登陆页面
进入
loginout
在来一个登陆验证 pass.asp
<%
Option Explicit
Dim username, password
username = Request.FORM("username")
password = Request.FORM("password")
'Change the username and password values below change the login
if (username = "admin") and (password = "admin") then
Response.Cookies("loginadmin") = "True"
Response.Redirect("hahahahahha.asp")
end if
Response.Redirect("login.asp")
%>
成功则进入hahahaha.asp页面
失败则返回login.asp
以下注销页面: loginout.asp
<%
Response.Cookies("loginadmin") = ""
Response.Redirect("login.asp")
%>
|