salve, sulla mia pagina ASP ho scritto il seguente codice:
Come potete vedere la funzione Checklog accede al database e verifica che i dati inseriti stiano in una tabella; se ci sono allora il valore di ritorno è true.codice:session("Auten")=CheckLog(request.querystring("USER"),request.querystring("PSW")) if Session("Auten")<>true then Response.Redirect "Forbidden.htm" else response.redirect "Private.asp" end if Function CheckLog(usr,psw) dim recordSet,getRec,PERCORSO getRec="SELECT * FROM Inscritti WHERE User='" & usr & "' and password='" & password & "'" '------------------------------------------------------------------------- ON ERROR RESUME NEXT response.write err.description PERCORSO=Server.mapPath("data.mdb") Set DATABASE =Server.CreateObject("ADODb.Connection") DATABASE.ConnectionTimeOut=60 DATABASE.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & PERCORSO Set RecRet=DATABASE.execute(getRec) if RecRet.Fields("User")="" then Checklog=true else CheckLog=false ON ERROR GOTO 0 end function
Il valore di ritorno è corretto; come mai allora mi dà un errore sulla redirect segnandomi un errore su un'altra riga???Per favore, aiutatemi.![]()

Rispondi quotando
VVoVe:
