如何用Cookie進(jìn)行登錄驗證?
login.htm
請注冊登錄隨風(fēng)起舞
<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">您要將注冊內(nèi)容保存為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 %>
將注冊內(nèi)容保存到Cookie<HR>
<% end if %>
歡迎光臨隨風(fēng)起舞!<P>
請確認(rèn)您的電子郵件: <% = Request("email") %>
</body></html>
相關(guān)文章
如何將產(chǎn)生的密碼記錄并發(fā)送給用戶并通過點擊鏈接激活?
如何將產(chǎn)生的密碼記錄并發(fā)送給用戶并通過點擊鏈接激活?...2006-11-11