This is my code. It seems to load but it doesn't redirect to the thanks page. Can anybody help me?
<% @LANGUAGE = VBScript %>
<% Option Explicit %>
<%
' name attribute of submit button
If Request.Form("Submit")<>"" then
Dim strName, strEmail, strQuery
strName = Trim(Request.Form("Last_name"))
strEmail = Trim(Request.Form("Email"))
strQuery = "" &_
"First Name - " & Request.Form("ClientName") & VbCrlf &_
"Last Name - " & Request.Form("Last_name") & VbCrlf &_
"Address - " & Request.Form("ClientAddress") & VbCrlf &_
"City - " & Request.Form("ClientCity") & VbCrlf &_
"State - " & Request.Form("ClientState") & VbCrlf &_
"Zip - " & Request.Form("ClientZip") & VbCrlf &_
"Email - " & Request.Form("Email") & VbCrlf &_
"Phone Number - " & Request.Form("ClientPhone") & VbCrlf &_
"Number of Children - " & Request.Form("ClientChildren") & VbCrlf &_
'response.write(strQuery & "<br>")
'response.end
if (strName <> "" And strEmail <> "") Then
on error resume next ' disable Error Handler
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = "info@tuitionsolution.com"
objMail.To = "phil@betabenefits.com"
objMail.Subject = "Your Inquiry " & strName
objMail.Body = strQuery
objMail.Send
Set objMail = Nothing
if err.number<>0 then
response.write(err.description)
end if
on error GOTO 0 ' restore to default behavior(HALT)
Response.Redirect("thanks.htm")
end if
Else ' FORM SUBMIT
<% end if %>