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("/mdb-database/utenti.mdb")
Dim sql
sql = "SELECT ID,CAMPO_DATA_NEL_DATABASE FROM dati WHERE NOMEUTENTE='" &nome_ut&_
"' AND PASSWORD='" &pass& "'"
Dim rs
Set rs = cn.Execute(sql)
Dim autenticato
if rs.eof then
autenticato = false
else
if rs("CAMPO_DATA_NEL_DATABASE")=now() then
autenticato = false
else
autenticato=true
end if
end if
rs.close
set rs=nothing
else if autenticato = true then
Session("Autenticato") = "OK"
sql="update dati set CAMPO_DATA_NEL_DATABASE=#" & now() & "# WHERE NOMEUTENTE='" &nome_ut&_
"' AND PASSWORD='" &pass& "'"
cn.execute(sql)
Response.Redirect("riservato.asp")
else
Response.Redirect("index.asp")
end if
end if
cn.Close
Set cn = Nothing
%>
ti ho messo in rosso quello che ho aggiunto. il CAMPO_DATA_NEL_DATABASE deve essere un campo DATA in formato gg/mm/aaaa
se ci sono problemi rispondi tranquillamente (non in pvt che tanto li leggo pochissimo)