codice:
<% 
Dim nome_ut 
Dim pass 
nome_ut = Replace(Request.Form("nome_utente"), "'", "''") 
pass = Replace(Request.Form("password"), "'", "''") 

Dim cn 
Set cn = Server.CreateObject("ADODB.Connection") 
cn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="&Server.MapPath("utenti.mdb") 
Dim sql 
sql = "SELECT * FROM Utenti WHERE NOMEUTENTE='" &nome_ut&_ 
"' AND PASSWORD='" &pass& "'" 
Dim rs 
Set rs = cn.Execute(sql) 

Dim autenticato 
if rs.eof then 
autenticato = false 
else 
autenticato = true 
end if 


if autenticato = true then 
Session("Autenticato") = "OK" 
Dim pagina 
pagina=rs("pagina") 
response.redirect (pagina) 

else 
Response.Redirect("index.asp") 
end if 

rs.Close 
cn.Close 
Set rs = Nothing 
Set cn = Nothing 
%>
Roby