%
dim valedit
function ValidateData(field, message)
dim messagetodisplay
if trim(len(Request(field))) = 0 then
messagetodisplay = message & "
"
else
messagetodisplay = ""
end if
ValidateData = messagetodisplay
end function
function TranslateIt(data)
if data = "on" then
TranslateIt = "Yes"
else
TranslateIt = "No"
end if
end function
'Check to see if this is a submit
if Request("sub") = "Y" then
'Validate the data
valedit = valedit & ValidateData("FirstName", "Please provide a valid First Name.")
valedit = valedit & ValidateData("LastName", "Please provide a valid Last Name.")
valedit = valedit & ValidateData("EmailAddress", "Please provide an E-mail Address.")
'If they passed all the validation edits
if len(valedit) = 0 then
'Send the form data in an e-mail
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "127.0.0.1"
Mail.From = "jbeall@ThePlanConsultingGroup.com"
Mail.FromName = "theplanconsultinggroup.com"
'Mail.AddAddress "robert@fangerpr.com"
'Mail.AddAddress "robert@fangerpr.com"
Mail.AddAddress "robert@fangerpr.com"
Mail.Subject = "Online Contact Form"
Mail.Body = "" & chr(10) & _
"First Name: " & Request("FirstName") & chr(10) & _
"Last Name: " & Request("LastName") & chr(10) & _
"Company: " & Request("Company") & chr(10) & _
"Title: " & Request("Title") & chr(10) & _
"Address1: " & Request("Address1") & chr(10) & _
"Address2: " & Request("Address2") & chr(10) & _
"City: " & Request("City") & chr(10) & _
"State: " & Request("State") & chr(10) & _
"Zip Code: " & Request("ZipCode") & chr(10) & _
"Email Address: " & Request("EmailAddress") & chr(10) & _
"Phone Number: " & Request("PhoneNumber") & chr(10) & _
"Comments: " & Request("Comments") & chr(10) & _
"Sign up for the newsletter: " & TranslateIt(Request("newsletter")) & chr(10)
Mail.Send
'Redirect the user to the confirmation page
Response.redirect "ty.htm"
end if
end if
%>
![]() |
|
|
|
THE PLAN CONSULTING GROUP, LLC | 200 S. MERIDIAN, SUITE 420 | INDIANAPOLIS, IN 46225 | PHONE: 317.837.1259 |