Skip navigation to main content
Please complete all fields marked with a * before submitting your details.
" ' handy functions here Function getErr(val) If val = false Then getErr = err Else getErr = "" End If End Function Function grab(val) grab = Request.Form(val) End Function Function stripVar(val) Dim str Dim re str = grab(val) Set re = New RegExp re.Pattern = "[;<>',#()\\]" re.Global = True stripVar = re.Replace(str, "") End Function Function stripDBVar(val) Dim str Dim re str = grab(val) Set re = New RegExp re.Pattern = "'" re.Global = True stripDBVar = re.Replace(str, "") End Function Function checkVar(val) Dim str str = stripVar(val) If Len(str) > 0 Then checkVar = true Else checkVar = false End If End Function Function getChecked(fld, val) Dim i i = grab(fld) If i = val Then getChecked = " checked=""checked""" Else getChecked = "" End If End Function ' Check whether the form has been posted yet If Request.ServerVariables("Request_Method") = "POST" Then ' check all details For i = LBound(flds_req) to UBound(flds_req) If checkVar(flds_req(i)) = false Then flds_ok = false End If Next If flds_ok = true Then dim dpa If grab("dpa_opt_in") = "yes" Then dpa = "yes" Else dpa = "no" End If If "" & Request.ServerVariables("SERVER_NAME") = "chipandpin.carbondxdevwin.com" Then 'dev 'mailto = "ballinger@dowcarter.com" mailto = "danny.bull@carbondx.com" mailfrom = "info@chipandpin.co.uk" Else ' test/live mailto = "danny.bull@carbondx.com" 'mailto = "corpcomms@apacs.org.uk" mailfrom = "info@chipandpin.co.uk" End If ' DATABASE CONN - REMOVED TEMPORARILY 'dim adoConn 'dim adoRS 'dim sql 'set adoConn = Server.CreateObject("ADODB.Connection") 'adoConn.Open "DSN=candp_dsn" 'sql = "insert into contact values(NULL,NULL,'" & stripDBVar("fname") & "','" & stripDBVar("sname") & "','" & stripDBVar("email") & "','" & stripDBVar("addr1") & "','" & stripDBVar("addr2") & "','" & stripDBVar("addr3") & "','" & stripDBVar("town") & "','" & stripDBVar("postcode") & "','" & stripDBVar("tel") & "','" & stripDBVar("enquiry") & "','" & dpa & "')" 'set adoRS = adoConn.Execute(sql) 'set adoConn=nothing mailbody = mailbody & "fname : " & stripVar("fname") & vbcrlf mailbody = mailbody & "sname : " & stripVar("sname") & vbcrlf mailbody = mailbody & "town : " & stripVar("town") & vbcrlf mailbody = mailbody & "email : " & stripVar("email") & vbcrlf mailbody = mailbody & "addr1 : " & stripVar("addr1") & vbcrlf mailbody = mailbody & "addr2 : " & stripVar("addr2") & vbcrlf mailbody = mailbody & "addr3 : " & stripVar("addr3") & vbcrlf mailbody = mailbody & "town : " & stripVar("town") & vbcrlf mailbody = mailbody & "postcode : " & stripVar("postcode") & vbcrlf mailbody = mailbody & "tel : " & stripVar("tel") & vbcrlf mailbody = mailbody & "enquiry : " & stripVar("enquiry") & vbcrlf mailbody = mailbody & "dpa : " & dpa & vbcrlf mailbody = mailbody & vbcrlf & vbcrlf & "---------------------------------------------------------------------" & vbcrlf mailsubject = "Chip and PIN website contact form" Set Mailer = new mailerclass Mailer.sendEmail mailfrom, mailto, mailsubject, mailbody response.redirect "enquiries_thanks.html" End If End IF %>If you have any questions or requests for the Chip and PIN Programme Management Organisation office, or would like to send us feedback on any aspect of the Programme or our website, please use this form.
<% If not flds_ok Then response.write(err) Else response.write("Please complete all fields marked with a * before submitting your enquiry.
") End If %>