% page = "support" %>
<%
SC = request("SC")
givethanks = 0
errFlag = 0
%>
<%
clicked = request("clicked")
if clicked = "1" then
name = validate(request("name"))
position = validate(request("position"))
postcode = validate(request("postcode"))
email = validate(request("email"))
family = validate(request("fam"))
dfes = validate(request("dfes"))
'-------begin validation
if len(name) < 2 then
errflag = 1
errText = "Name is required." & "
"
end if
if len(email) < 5 AND len(telephone) < 5 then
errflag = 1
errText = errText & "Email is required." & "
"
end if
if len(email) > 0 AND (InStr(email,".") = 0 OR InStr(email,"@") = 0) then
errflag = 1
errText = errText & "Invalid email address." & "
"
end if
if len(family) < 3 then
errflag = 1
errText = errText & "Please select a product family." & "
"
end if
if len(Position) < 2 then
errflag=1
errtext=errtext & "Please include your position."
end if
'------end validation
'------if validated, save in the database
if errFlag = 0 then
'make the vars database friendly
nameF = LEFT(replace(name,"'","''"),50)
positionF = LEFT(replace(position,"'","''"),50)
schoolF = LEFT(replace(school,"'","''"),150)
addressF = LEFT(replace(address,"'","''"),150)
postcodeF = LEFT(replace(postcode,"'","''"),20)
emailF = LEFT(replace(email,"'","''"),150)
MYSQL = "EXEC Marketing.addtoEmailList @dfes='" & dfes & "', @user_recnum='',@email='" & emailF & "', "
MYSQL = MYSQL & "@financeemail='', @Name='" & nameF & "',@Position='" & positionF & "',"
MYSQL = MYSQL & "@Department='" & family & "',@productid='', @sourcenum='6', " 'sourcenum=6 means "website"
MYSQL = MYSQL & "@postcode='" & postcodeF & "', @site='" & session("site") & "'"
rs.Open MYSQL, dsConn
res=rs("res")
rs.Close
givethanks = 1
end if
end if
%>
Sign up for emails to receive competitions, freebies, updates and subject news.
Emails are infrequent and you can unsubscribe at any time.
<< search again |