ho finito di fare così che ne dite? sarà sbagliato ma almeno ci ho provato
login.asp
codice:
<%
dim strCookie
strCookie = request.cookies("ricordami")
if response.cookies("ricordami")="true" then
Response.Write ("Benvenuto, sei gia loggato!")
else
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Andrea Log-in with cookies</title>
</head>
<body>
<table cellspadding="3" align="center">
<tr>
<td>
<form method="post" action="verify.asp">
Username: <input type="Text" name="user" />
Password: <input type="Password" name="pass" />
Ricordami <input name="ricorda" type="checkbox" checked="Yes" /><input type="Submit" value="Login" name="submit">
</form>
Username = nickPassword = pwd
</td>
</tr>
</table>
</body>
</html>
<%
end if
%>
verify.asp
codice:
<%
dim Username, Password, Ricordami
Username = Request.Form("user")
Password = Request.Form("pass")
Ricordami = Request.Form("ricorda")
if (Username = "nick") and (Password = "pwd") then
if (Ricordami &"[]" <> "[]") then
response.cookies("ricordami")="true"
response.cookies("ricordami").Expires = dateAdd("yyyy",1, date)
response.cookies("ricordami").Secure = true
Response.Write ("I Cookies sono stati memorizzati con successo. Non hai più bisogno di effetuare il login!")
else
Response.Write ("Ti sei loggato senza attivare la funzione ricorda!")
end if
elseif (Username = "") and (Password = "") then
Response.Write ("Compila tutti i campi per effeutare il login!")
elseif (Username = "") then
Response.Write ("Inserisci l'username, perfavore!")
elseif (Password = "") then
Response.Write ("Inserisci la password, perfavore!")
else
Response.Write ("L'accesso non è stato effetuato! Il nick o la password sono errati!")
end if
%>
Torna indietro
che ne dite? :rollo: L'errore e il seguente che si capisce benissimo:Object doesn't support this property or method nella linea 5:
if response.cookies("ricordami")="true" then
che mi dite? ho paura che mi uccidiate