php使用Cookie进行登录验证的小例子
时间:2021-07-01 10:21:17
帮助过:4人阅读
2、登录检测页面 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
- %>
3、登录成功页面
- 登录验证
- <% if bLoginSaved then %>
- 将注册内容保存到Cookie
- <% end if %>
- 欢迎光临!
- 请确认您的电子邮件: <% = Request("email") %>
|