首先是前台的表单域:
<form name="Login" action="loginaction.asp" method="post">
用户名称
<input name="User" type="text"
id="User" size="23" maxlength="20">
用户密码:<input name="Password" type="password" id="Password" size="23" maxlength="20">
Cookie选项:
<select name=CookieDate>
<option selected value=0>不保存</option>
<option value=1>保存一天</option>
<option value=2>保存一月</option>
<option value=3>保存一年</option>
</select>
<input type="submit" name="Submit" value=" 确认 "> <input name="reset" type="reset" id="reset" value=" 清除 ">
</form>
验证页面
rs("szd_last_time")=now()
rs("szd_cookie")=cookiedate
rs.update
jibie=rs("szd_jibie")
call SaveCookie_5do8()
sub SaveCookie_5do8()
Response.Cookies("5do8")("User")=user
Response.Cookies("5do8")("Password") = PassWord
Response.Cookies("5do8")("CookieDate") = CookieDate
select case CookieDate
case 0
''''not save
case 1
Response.Cookies("5do8").Expires=Date+1
case 2
Response.Cookies("5do8").Expires=Date+31
case 3
Response.Cookies("5do8").Expires=Date+365
end select
end sub