login.htm
请注册登录随风起舞
<form action="checklogin.asp" method="post">
电子邮件: <input type="text" name="email" size="40">
密码: <input type="password" name="password" size="40">
<input type="checkbox" name="savelogin" value="on">您要将注册内容保存为cookie吗?
<input type="submit" value="登录"><input type="reset">
</form>
checklogin.asp
<%
dim bloginsaved
if request("savelogin") = "on" then
response.cookies("savedlogin")("email") = request("email")
response.cookies("savedlogin")("pw") = request("password")
response.cookies("savedlogin").expires = date + 30
bloginsaved = true
else
bloginsaved = false
end if
%>
<html>
<head>
<title>山水盈盈之登录验证</title>
</head>
<body>
<% if bloginsaved then %>
将注册内容保存到cookie<hr>
<% end if %>
欢迎光临随风起舞!<p>
请确认您的电子邮件: <% = request("email") %>
</body></html>