%@ Language=VBScript %> <% Dim strconn strconn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("login.mdb") TheMessage = "Compilate il form inserendo almeno i dati obbligatori." if (Len(Request.Form("OK")) <> 0 and _ Len(Request.Form("Nome")) <> 0 and _ Len(Request.Form("Cognome")) <> 0 and _ Len(Request.Form("Indirizzo")) <> 0 and _ Len(Request.Form("Citta")) <> 0 and _ Len(Request.Form("UserID")) <> 0 and _ Len(Request.Form("Email")) <> 0 and _ Len(Request.Form("Password")) <> 0 and _ Request.Form("Password") = Request.Form("ConfirmPSW")) then set conn = server.createobject ("adodb.connection") conn.open strconn set RSLogin = conn.Execute("select LoginID, UserID from tblLogin where " _ & "UserID = '" & Request.Form("UserID") & "'") if RSLogin.EOF then conn.Execute "insert into tblLogin (Nome, Cognome, Indirizzo, Citta, CAP, Sesso, UserID, Password, Email ) values (" _ & "'" & Request.Form("Nome") & "', " _ & "'" & Request.Form("Cognome") & "', " _ & "'" & Request.Form("Indirizzo") & "', " _ & "'" & Request.Form("Citta") & "', " _ & "'" & Request.Form("CAP") & "', " _ & "'" & Request.Form("Sesso") & "', " _ & "'" & Request.Form("UserID") & "', " _ & "'" & Request.Form("Password") & "', " _ & "'" & Request.Form("Email") & "')" set RSLogin = conn.Execute("select LoginID from tblLogin where " _ & "Password = '" & Request.Form("Password") & "'") Session("ID") = RSLogin("LoginID") Session("UserID") = Request.Form("UserID") Session("Nome") = Request.Form("Nome") Session("Cognome") = Request.Form("Cognome") Session("Email") = Request.Form("Email") Response.Redirect "./conferma.asp" else TheMessage = "User ID già in uso. Riprova." end if elseif (Request.Form("Password") <> Request.Form("ConfirmPSW")) then TheMessage = "Attenzione: le password non coincidono!" else TheMessage = "Compilare tutti i campi obbligatori (*) per attivare il nuovo account." end if %>
|
FORD EDSEL
|
||||