Forum Moderators: open

Message Too Old, No Replies

remember me checkbox

still cannot get it to work

         

Blelisa

7:58 pm on Feb 28, 2005 (gmt 0)

10+ Year Member



Here is my code, does anyone know what I am doing wrong?

<form method="post" action="verify.asp">
Username: <input type="text" name="uname" maxlength="20" value="<%=Request.Cookies("u")%>"><br />
Password: <input type="password" name="pass" maxlength="20" value="<%=Request.Cookies("p")%>"><br />
<input type="checkbox" name="remember" value="ON" checked> Remember Me<br />
<input type="submit" name="cmdsubmit" value="log-in">
</form>

too much information

8:02 pm on Feb 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try putting 'checked' in all caps, or substitute it for 'SELECTED'

One of those should work.

dotme

8:20 pm on Feb 28, 2005 (gmt 0)

10+ Year Member



In verify.asp, you would need the following code:

If request.form("remember") = "ON" Then
' Set cookie(s) to expire at later date, for example
response.cookies("cookiename") = value
response.cookies("cookiename").Expires = (Date+365)
End If

Does this help?

mattglet

8:25 pm on Feb 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



TMI-

Just for clarification, "checked" is the correct property (selected is for dropdown/combo boxes). Also, it is not case sensitive.

As for the solution to the problem, I would bet dotme is on the right track.

too much information

8:57 pm on Feb 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



sorry, vague question, it was my best shot