hi all, i wrote a code to store the user's username as a cookie so as he need not key in his username in his next log in. but yet, my system is unable to record it as a cookie. can anyone help? thanks.
this is the code where i try retrieve his cookie username in his textbox for keying in his username
<input type=
"text" name="Name" size="20" maxlength="15" value="<%=Request.Cookies("Savelogin")%>" >
ths is the code for him to check the checkbox to save his username as a cookie
<input type=
"checkbox" name="Savelogin" >Save Login as a cookie?
Next, the form will be submitted to another page for processing
if (confirm('Press OK to proceed, otherwise Cancel to go back')){document.confirmUser.method = 'post';
document.confirmUser.action='loginConfirm.asp';
document.confirmUser.submit();}
this is the code in the next page"loginConfirm.asp"
<%
dim strEmail
if request.queryString("cookie")=1 then
strEmail=request.cookies("savelogin")("Name")
else
strEmail=request.form("name")
end if
'name of cookie is Savelogin
Dim cookieSaved
if request.form("Savelogin")="on" then
response.cookies("Savedlogin")("Name")=request.form("name")
response.cookies("Savedlogin").Expires=Date+3
cookieSaved=True
else
cookieSaved=False
end if
%>