% Dim bShowForm Dim bInsErrOcc Dim bValidErrOcc Dim bInsSucc bInsSucc = False bShowForm = True bInsErrOcc = False bValidErrOcc = False If Request.Form("tapl_insert") <> "" Then If ValInp Then bShowForm = False Dim conn, rs, cmdstr Set conn = Server.CreateObject("ADODB.Connection") conn.Open "Driver={MySQL};SERVER=localhost;DATABASE=d2594_1;UID=d2594;PWD=Lo72go58;" cmdstr = "INSERT INTO tbl_applications (tapl_email, tapl_name,tapl_city,tapl_phone,tapl_club,tapl_scooter,tapl_comment,tapl_shout " & _ ") VALUES (" & _ "'" & FixI(Request.Form("tapl_email")) & "'," & _ "'" & FixI(Request.Form("tapl_name")) & "'," & _ "'" & FixI(Request.Form("tapl_city")) & "'," & _ "'" & FixI(Request.Form("tapl_phone")) & "'," & _ "'" & FixI(Request.Form("tapl_club")) & "'," & _ "'" & FixI(Request.Form("tapl_scooter")) & "'," & _ "'" & FixI(Request.Form("tapl_comment")) & "'," & _ "'" & FixI(Request.Form("tapl_shout")) & "'" & _ ")" On Error Resume Next conn.Execute(cmdstr) conn.Close Set conn = Nothing If Err.Number <> 0 Then bInsErrOcc = True Set conn = Nothing On Error Goto 0 Else bInsSucc = True End If Else bShowForm = True bValidErrOcc = True End If End If Function FixI(sInput) Dim sRet sRet = sInput sRet = Replace(sInput,"'","") sRet = Replace(sRet,"""","") sRet = Replace(sRet,"$","") sRet = Replace(sRet,"%","") FixI = Trim(sRet) End Function Function ValInp If FixI(Request.Form("tapl_email")) <> "" And FixI(Request.Form("tapl_name")) <> "" And FixI(Request.Form("tapl_phone")) <> "" Then ValInp = True Else ValInp = False End If End Function %>