Before I start I am going to admit I know very little about asp coding and am looking to amend my code so it has form validation. I want the validation to require all fields are completed, a correct email address loaded and I want the code to go to a specific URL if it succeeds or fails rather than a line of text that is current displays. My current code is:
<% @LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Set Mail = Server.CreateObject("SMTPsvg.Mailer") 'create an Asp mail component.
Mail.FromName = "Feedback"
Mail.RemoteHost = "remote_host_url" ' The mail server you have to use with Asp Mail
Mail.AddRecipient "alliancepoliceforce.co.uk", "firstname.lastname@example.org"
Mail.Subject = "Website - Info Request"
strBodyText = Request.Form("Feedback")
strBodyText=strBodyText & Request.Form("name") & vbcrlf
strBodyText=strBodyText & Request.Form("email") & vbcrlf
strBodyText=strBodyText & Request.Form("comments")
if Mail.SendMail then
Response.Write "Your mail has already been sent..."
Response.Write "Mail send failure. Error was " & Mail.Response
Set Mail = Nothing
My question is how easy would it be to amend the code and where do I start? Any help would be greatly appreciated.