%@LANGUAGE="VBSCRIPT"%> <% 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 ID 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 rs.Close cn.Close Set rs = Nothing Set cn = Nothing if autenticato = true then Session("Autenticato") = "OK" Response.Redirect("riservato.asp") else Response.Redirect("index.asp") end if %>
|
|
|||||||||||||||||||||
© Copyrigth
2005 - 2006 Europae Fami.li.a. |
||||||||||||||||||||||