如何用Cookie進(jìn)行登錄驗(yàn)證?
login.htm
請(qǐng)注冊(cè)登錄隨風(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">您要將注冊(cè)內(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>山水盈盈之登錄驗(yàn)證</title>
</head>
<body>
<% if bLoginSaved then %>
將注冊(cè)內(nèi)容保存到Cookie<HR>
<% end if %>
歡迎光臨隨風(fēng)起舞!<P>
請(qǐng)確認(rèn)您的電子郵件: <% = Request("email") %>
</body></html>
- PHP通過session id 實(shí)現(xiàn)session共享和登錄驗(yàn)證的代碼
- php自動(dòng)注冊(cè)登錄驗(yàn)證機(jī)制實(shí)現(xiàn)代碼
- jQuery.ajax 用戶登錄驗(yàn)證代碼
- 基于pear auth實(shí)現(xiàn)登錄驗(yàn)證
- jquery ajax 登錄驗(yàn)證實(shí)現(xiàn)代碼
- php cookie 登錄驗(yàn)證示例代碼
- php session應(yīng)用實(shí)例 登錄驗(yàn)證
- S2SH整合JQuery+Ajax實(shí)現(xiàn)登錄驗(yàn)證功能實(shí)現(xiàn)代碼
相關(guān)文章
如何實(shí)現(xiàn)某些頁(yè)面只讓特定的用戶瀏覽?
如何實(shí)現(xiàn)某些頁(yè)面只讓特定的用戶瀏覽?...2006-11-11如何將產(chǎn)生的密碼記錄并發(fā)送給用戶并通過點(diǎn)擊鏈接激活?
如何將產(chǎn)生的密碼記錄并發(fā)送給用戶并通過點(diǎn)擊鏈接激活?...2006-11-11