-
12345678_0001
在登录框增加一个记住密码按钮: 记住密码:<input value="1" type="checkbox" name="checkbox"<% If Request.Cookies("OTRememberMeCookie") = "1" Then Response.Write "CHECKED" Else Response.Write "" End If %>><input type="hidden" name="action" value="true"><input type="hidden" name="postion" value="<%=postion%>"> 在提交登录请求时增加以下处理代码,将用户名和密码写入cookie:<% If Request.form("checkbox") ="1" Then Response.Cookies("OTPasswordCookie") = Request.Form("Password") Response.Cookies("OTRememberMeCookie") = "1" Response.Cookies("OTPasswordCookie").expires = Date+365 Response.Cookies("OTRememberMeCookie").expires = Date+365 Else Response.Cookies("OTRememberMeCookie") ="" Response.Cookies("OTPasswordCookie") = "" End If %>
-
潇潇雨雨
在用户登录成功后添加下面的代码:Response.Cookies("UserCookie")("User")=xxxResponse.Cookies("UserCookie")("Password")=md5(pwd, 32)Response.Cookies("UserCookie").Expires=Date+cookies失效时间密码最好加密。在网站首页添加这样的代码:strUsername=Request.Cookies("UserCookie")("User")strPassword=Request.Cookies("UserCookie")("Password")验证这个cookies里取得的用户和密码是否正确,如果正确,就不用登录了。
-
慕森王
Response.Cookies("Username")=用户名Response.Cookies("Password")=密码这样设然后这样读:Request.Cookies("Username")Request.Cookies("Username")