codice:
<%@Language=VBscript%>
<%
username = trim(request.form("username"))
username = replace(username, "'", "''")
password = trim(request.form("password"))
password = replace(password, "'", "''")
dim cn
dim rs
set rs = Server.CreateObject("ADODB.Recordset")
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "DRIVER={Microsoft Access Driver (*.mdb)};PWD=..;DBQ=" & server.MapPath("/mdb-database/DB.mdb")
found = false
sql = "select * from Club "&_
"where username = '"&username&"' and [Password] = '"&password&"'"
rs.Open sql, cn, 1
if not rs.eof then
found = true
end if
rs.close
cn.Close
set rs = Nothing
set cn = Nothing
if found then
Session("rb_accesso") = True
response.redirect "http://www.club.it/home.htm?username="&username
else
response.redirect "login_club.asp?error=1"
end if
%>
Roby