questo è lo script di una pagina in asp chiamata verifica.asp
<html>
<head>
<title>SEZIONI RISERVATE</title>
</head>
<body>
</p>
<p align="center"><font face="Verdana" size="3">Sezioni Riservate - Login</font></p>
<%
Username = Request.Form("username")
Password = Request.Form("password")
IF Username <> "" and Password <> "" then
dim conn, strConn
strDataBasePath = "/mdb-database/database.mdb"
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(strDataBasePath)
Set conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConn
SQL = "SELECT * FROM Utenti where username = "" & username &"" and password = "" & password &"" and attivo = 1"
Set recSet = Server.CreateObject("ADODB.Recordset")
RecSet.Open SQL, Conn, adOpenStatic, adLockOptimistic
IF Not RecSet.Eof Then
Session("Loggato") = True
Session("Username") = Username
Else
Session("Loggato") = False
End IF
RecSet.Close
Set RecSet = Nothing
Conn.Close
Set Conn = Nothing
IF Session("Loggato") = True then
Response.Redirect "protetta_home.asp"
Else
%>
<hr>
<p align="center"><font face="Verdana" size="2">Username/Password non corretti!</font></p>
<hr>
<%
End IF
Else
%>
<hr>
<p align="center"><font face="Verdana" size="2">Compila correttamente tutti i campi!</font></p>
<hr>
<%
End IF
%>
</body>
</html>
non riesco a capire come mai anche se inserisco i dati username e password corretti mi da sempre password/username errati
spero possiate aiutarmi grazie

Rispondi quotando