Remember me funktion i asp virker ikke
Hej folkes.Jeg har været ved at skrive lidt om på et eksisternede script, men kan sku ikke få Remember me funktionen til at virke.
Jeg efterlader lige min kode.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
If cstr(Request.Form("NsUsername"))<>"" Then
If Request.form("NsSaveLogin") ="1" Then
Response.Cookies("Kcookie") = Request.Form("NsCustomerNo")
Response.Cookies("ucookie") = Request.Form("NsUsername")
Response.Cookies("Pcookie") = Request.Form("NsPassword")
Response.Cookies("Rcookie") = "1"
Response.Cookies("ucookie").expires = Date + 30
Response.Cookies("Pcookie").expires = Date + 30
Response.Cookies("Kcookie").expires = Date + 30
Response.Cookies("Rcookie").expires = Date + 30
Else
Response.Cookies("Rcookie") = ""
Response.Cookies("Krcookie") = ""
Response.Cookies("ucookie") = ""
Response.Cookies("Pcookie") = ""
End If
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Webshop Login</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 03px;
}
-->
</style>
<link href="css/webshoplogin.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
color: #B72B06;
}
a:active {
text-decoration: none;
}
-->
</style></head>
<body>
<form action="http://webshop.com/login.aspx" method="post" target="_blank" id="form1">
<table width="160" border="0">
<tr>
<td width="153" class="skrifter">Kundenummer</td>
</tr>
<tr>
<td><input value="<%= Request.Cookies("Kcookie") %>" name="NsCustomerNo" type="text" class="kasser" id="NsCustomerNo" /></td>
</tr>
<tr>
<td class="skrifter">Brugernavn</td>
</tr>
<tr>
<td><input value="<%= Request.Cookies("ucookie") %>" name="NsUsername" type="text" class="kasser" id="NsUsername" /></td>
</tr>
<tr>
<td class="skrifter">Adgangskode</td>
</tr>
<tr>
<td><input value="<%= Request.Cookies("Pcookie") %>" name="NsPassword" type="password" class="kasser" id="NsPassword" /></td>
</tr>
<tr>
<td><p>
<input name="Submit" type="submit" class="skrifter" value="Log ind" />
</p></td>
</tr>
<tr>
<td><label>
<input <%If (Request.Cookies("Rcookie") = "1") Then Response.Write("CHECKED") : Response.Write("")%> name="NsSaveLogin" type="checkbox" id="NsSaveLogin" value="1" />
</label> <span class="skrifter">Gem disse oplysninger</span></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>></td>
</tr>
</table></form></body>
</html>