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>