Jump to content

Recommended Posts

Having trouble with this contact form's zip code function -- repeatedly gives me the alert ("Please, Enter state name at certificate holder information"), but I can't figure out why. Suggestions? Here's the page http://seanmccuedesign.com/mack/certificate.php

Thanks

I'm not filling out all that information...  Do you have the code that checks for the certificate holder?

I don't know how I will fix it.  That's why I posted on this forum. If I knew how to fix it, I wouldn't have asked. How do I get the code that checks for the certificate holder?

What do you mean, "how do I get the code"?  Is this even your site?  How the hell do you expect someone to help when you can't even provide the code?

Yea dude it's my site. I bought this template. Please relax. I'm new to PHP and trying to get help. Is this the code you're talking about:

 

<?php
// EMAIL ADDRESS TO SEND CONTACT FORM RESULTS TOO
$your_email_address = "youraddresshere@gmail.com";

$contact_question1 = rand(1, 5);
$contact_question2 = rand(1, 5);

if ($_POST)
{
	$required = 0;

	// IF FIELD LENGTH EQUALS ZERO THROW ERROR
	if (strlen($_POST["contact_name"]) == 0) $required++;
	if (strlen($_POST["contact_message"]) == 0) $required++;
	if (strlen($_POST["contact_answer"]) == 0) $required++;
	if ($_POST["contact_answer"] != ($_POST["contact_question1"] + $_POST["contact_question2"])) $error_message = 'You answered the question incorrectly.';

	if ($required == 0 && !$error_message)
	{
		// CHECK SIMPLE MATH QUESTION
		if (@mail($your_email_address, "Contact Form Message", str_replace("\n", "<br />", $_POST["contact_message"]), "From: ".$_POST["contact_email"]."\nReply-To: ".$_POST["contact_email"]."\nContent-Type: text/html", "-f ".$_POST["contact_email"]))
		{
			$send_message = 'Your message was successfully sent.';
		}
		else
		{
			$error_message = 'Your message failed to send.';
		}
	}
	elseif ($required > 0 && !$error_message)
	{
		$error_message = 'You left one or more required fields blank.';
	}
}
?>

Please relax.

That was me relaxed.  Don't tell me what to do, thanks.  :smoker:

 

Is this the code you're talking about:

No, you said it was an alert() message but yet you give me PHP code, but that's OK.

 

You have a huge inlined JS function that's called validate().  There are like 20-30 checks that, if fail, will alert that error message.  I suggest you look at the conditions in the function and see which one is failing.

Aha - - I see. Okay well there was a glitch in the validate section of the inline JS function, and now it works, but it won't send the info to the email I've defined for the form. It takes you to the form the user has submitted, but the form is blank as well, and the form never reaches the email inbox.

I'm guessing the PHP code you posted previously is the certificate_info.php file.  If not, can you post it?  That's where your form is being submitted to.

 

Aha - - I see. Okay well there was a glitch in the validate section of the inline JS function, and now it works, but it won't send the info to the email I've defined for the form. It takes you to the form the user has submitted, but the form is blank as well, and the form never reaches the email inbox.

Just to clarify, you get brought back to the same form that you already filled in but it's blank?

Yea, but there's nothing there - - it's all ancient html markup:

 

<center><Font face='verdana,arial' size=2><I>Thank you for your time in submitting this certificate of insurance form. A Mack Insurance Group representative will respond to your submission as soon as possible.</I></FONT><br><br></center><HTML><BODY><TABLE width='95%' border=1 cellspacing=0 cellpadding=2 style='border:border-collapse'><TR><TD align=center bgcolor='#c1c1c1'><FONT face='verdana,arial' size='1'><B>General Certificate</B></FONT></TD></TR><TR><TD align=center bgcolor='#EFEFEF'><FONT face='verdana,arial' size='1'><B>Insured Information</B></FONT></TD></TR><TR><TD><TABLE width='100%' border=1 cellspacing=0 cellpadding=2 bordercolor='#C1C1C1'><TR><TD width='30%'><FONT face='verdana,arial' size='1'>Name</FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Contact</FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Date</FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Phone </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR></TABLE></TD></TR><TR><TD align=center bgcolor='#EFEFEF'><FONT face='verdana,arial' size='1'><B>Certificate Holder Information</B></FONT></TD></TR><TR><TD><TABLE width='100%' border=1 cellspacing=0 cellpadding=2 bordercolor='#C1C1C1'><TR><TD width='30%'><FONT face='verdana,arial' size='1'>Name</FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Address</FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>City</FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>State</FONT></TD><TD><FONT face='verdana,arial' size='1'>  </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Email</FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Attention</FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Phone</FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Fax</FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR></TABLE></TD></TR><TR><TD align=center><TABLE border=1 cellspacing=0 cellpadding=2 bordercolor='#c1c1c1'><TR bgcolor='#EFEFEF'><TD><FONT face='verdana,arial' size='1'><B>Type Of Insurance Required</B></FONT></TD><TD><FONT face='verdana,arial' size='1'><B>Mark Coverages to be Included with an 'X'</B></FONT></TD><TD><FONT face='verdana,arial' size='1'><B>Limits Required</B></FONT></TD><TD><FONT face='verdana,arial' size='1'><B>Notes</B></FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>General Liability</FONT></TD><TD align=center><FONT face='verdana,arial' size='1'><Input type=checkbox name=Gen_Lia disabled> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Auto Liability</FONT></TD><TD align=center><FONT face='verdana,arial' size='1'><Input type=checkbox name=Auto_Lia disabled> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Workers Compensation</FONT></TD><TD align=center><FONT face='verdana,arial' size='1'><Input type=checkbox name=Workers_Lia disabled> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Umbrella/Excess Liability</FONT></TD><TD align=center><FONT face='verdana,arial' size='1'><Input type=checkbox name=Umbrella_Lia disabled> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Property</FONT></TD><TD align=center><FONT face='verdana,arial' size='1'><Input type=checkbox name=PropertyLia disabled> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Contractors</FONT></TD><TD align=center><FONT face='verdana,arial' size='1'><Input type=checkbox name=Contents disabled> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Other Describe</FONT></TD><TD align=center><FONT face='verdana,arial' size='1'><Input type=checkbox name=Others disabled> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR></TABLE></TD></TR><TR><TD align=center bgcolor='#EFEFEF'><FONT face='verdana,arial' size='1'><B>Special Requirements</B></FONT></TD></TR><TR><TD><TABLE width='100%' cellspacing=0 cellpadding=2 border=1 bordercolor='#c1C1C1'><TR><TD><FONT face='verdana,arial' size='1'>Additional Insured</FONT></TD><TD><FONT face='verdana,arial' size='1'>Not attended </FONT></TD><TD><FONT face='verdana,arial' size='1'> Policies this applies to :  </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Waiver of Subrogation</FONT></TD><TD><FONT face='verdana,arial' size='1'>Not attended </FONT></TD><TD><FONT face='verdana,arial' size='1'> Policies this applies to :  </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Loss Payee</FONT></TD><TD><FONT face='verdana,arial' size='1'>Not attended </FONT></TD><TD><FONT face='verdana,arial' size='1'> Policies this applies to :  </FONT></TD></TR><TR><TD><FONT face='verdana,arial' size='1'>Notice of Cancellation</FONT></TD><TD><FONT face='verdana,arial' size='1'>Not attended </FONT></TD><TD><FONT face='verdana,arial' size='1'> </FONT></TD></TR></TABLE></TD></TR><TR><TD align=center bgcolor='#EFEFEF'><FONT face='verdana,arial' size='1'><B>Other Instructions</B></FONT></TD></TR><TR><TD align=left><FONT face='verdana,arial' size='1'> </FONT></TD></TR><TR><TD><TABLE width='100%' cellspacing=0 cellpadding=2 border=1 bordercolor='#c1C1C1'><TR><TD align=center><FONT face='verdana,arial' size='1'>AUTO</FONT></TD><TD align=center><FONT face='verdana,arial' size='1'>VIN#</FONT></TD><TD align=center><FONT face='verdana,arial' size='1'>COST NEW</FONT></TD></TR><TR><TD align=center><FONT face='verdana,arial' size='1'> </FONT></TD><TD align=center><FONT face='verdana,arial' size='1'> </FONT></TD><TD align=center><FONT face='verdana,arial' size='1'> </FONT></TD></TR></TABLE></TD></TR></TABLE></BODY></HTML><br>
<body>
</body>
</html>

 

Actually here's the correct one. It's been converted from asp to php:

 

<?php

/*
  ASP Translator Messages (These can be removed later)
  ----------------------------------------------------

  1. Script contains an include file; check to see if the url has changed.
  2. All "Dim" statements have been changed to comments for reference.

*/

?>
<?@ $language=$vbscript?>
<? include "dbconn.asp"; ?> 
<? 
//form variable ------ start
//dim $Ins_Name; 
//dim $Ins_Contact; 
//dim $Ins_Date; 
//dim $Ins_Phone;

//dim $Cer_Name;
//dim $Cer_Address;
//dim $Cer_City;
//dim $Cer_State;
//dim $Cer_Zip; 
//dim $Cer_Email;
//dim $Cer_Att; 
//dim $Cer_Phone;
//dim $Cer_FaxTo;
//dim $Cer_Fax; 

//dim $Gen_Lia;
//dim $Gen_Lia_Limit; 
//dim $Gen_Lia_Notes; 

//dim $Auto_Lia;
//dim $Auto_Lia_Limit; 
//dim $Auto_Lia_Notes; 

//dim $Workers_Comp; 
//dim Workers_Comp_Limit; 
//dim Workers_Comp_Notes; 

//dim $Umbrella_Lia; 
//dim Umbrella_Lia_Limit; 
//dim Umbrella_Lia_Notes; 

//dim $PropertyLia;
//dim PropertyLia_Limit;
//dim PropertyLia_Notes; 

//dim $Contractors; 
//dim Contractors_Limit; 
//dim Contractors_Notes;

//dim $Other; 
//dim $Other_Limit; 
//dim $Other_Notes; 

//dim Sp_Additional_Insure; 
//dim Sp_Additional_Insure_Policies; 

//dim $Sp_Waiver;
//dim Sp_Waiver_Policies;

//dim $Sp_Loss; 
//dim $Sp_Loss_Policies; 

//dim Sp_Notice_Cancellation; 

//dim Other_Instructions; 

//dim $Auto; 
//dim $Vin;
//dim $CostNew;

//form variable ------ end

//dim $strBody;
//dim $myMail;
//dim $strMessage;
//dim $sql;


$Ins_Name = trim(str_replace("'","''",Request("Ins_Name")));
$Ins_Contact = trim(str_replace("'","''",Request("Ins_Contact")));

if (Request("Ins_Date_MM") != "" && Request("Ins_Date_DD")!="" && Request("Ins_Date_YY")!= "") {
$Ins_Date = Request("Ins_Date_MM")."/".Request("Ins_Date_DD")."/".Request("Ins_Date_YY");
} else {
$Ins_Date = NULL;
}

if (Request("Ins_Phone_1")!= "" && Request("Ins_Phone_2")!="" && Request("Ins_Phone_3")!="") {
$Ins_Phone = "(".Request("Ins_Phone_1").")".Request("Ins_Phone_2")."-".Request("Ins_Phone_3");
} else {
$Ins_Phone = NULL;
}

$Cer_Name = trim(str_replace("'","''",Request("Cer_Name")));
$Cer_Address = trim(str_replace("'","''",Request("Cer_Address")));
$Cer_City = trim(str_replace("'","''",Request("Cer_City")));
$Cer_State = trim(str_replace("'","''",Request("Cer_State")));
$Cer_Zip = trim(str_replace("'","''",Request("Cer_Zip")));
$Cer_Email = trim(str_replace("'","''",Request("Cer_Email")));
$Cer_Att = trim(str_replace("'","''",Request("Cer_Att")));
if (Request("Cer_Phone_1")!= "" && Request("Cer_Phone_2")!="" && Request("Cer_Phone_3")!="") {
$Cer_Phone = "(".Request("Cer_Phone_1").")".Request("Cer_Phone_2")."-".Request("Cer_Phone_3");
} else {
$Cer_Phone = NULL;
}
$Cer_FaxTo = trim(str_replace("'","''",Request("Cer_FaxTo")));

if (Request("Cer_Fax_1")!= "" && Request("Cer_Fax_2")!= "" && Request("Cer_Fax_3") != "") {
$Cer_Fax = "(".Request("Cer_Fax_1").")".Request("Cer_Fax_2")."-".Request("Cer_Fax_3");
} else {
$Cer_Fax = NULL;
}

$Gen_Lia = Request("Gen_Lia");
if ($Gen_Lia == "checkbox") {
$Gen_Lia = "1"; //"<img src='images/checked.bmp'>"
} else {
$Gen_Lia = "0"; //"<img src='images/unchecked.bmp'>"
}
$Gen_Lia_Limit = trim(str_replace("'","''",Request("Gen_Lia_Limit")));
$Gen_Lia_Notes = trim(str_replace("'","''",Request("Gen_Lia_Notes")));

$Auto_Lia = Request("Auto_Lia");
if ($Auto_Lia == "checkbox") {
$Auto_Lia = "1"\'"<img src='images/checked.bmp'>";
} else {
$Auto_Lia = "0"\'"<img src='images/unchecked.bmp'>";
}
$Auto_Lia_Limit = trim(str_replace("'","''",Request("Auto_Lia_Limit")));
$Auto_Lia_Notes = trim(str_replace("'","''",Request("Auto_Lia_Notes")));

$Workers_Comp = Request("Workers_Comp");
if ($Workers_Comp == "checkbox") {
$Workers_Comp = "1"\'"<img src='images/checked.bmp'>";
} else {
$Workers_Comp = "0"\'"<img src='images/unchecked.bmp'>";
}
Workers_Comp_Limit = trim(str_replace("'","''",Request("Workers_Comp_Limit")));
Workers_Comp_Notes = trim(str_replace("'","''",Request("Workers_Comp_Notes")));

$Umbrella_Lia = Request("Umbrella_Lia");
if ($Umbrella_Lia == "checkbox") {
$Umbrella_Lia = "1"\'"<img src='images/checked.bmp'>";
} else {
$Umbrella_Lia = "0"\'"<img src='images/unchecked.bmp'>";
}
Umbrella_Lia_Limit = trim(str_replace("'","''",Request("Umbrella_Lia_Limit")));
Umbrella_Lia_Notes = trim(str_replace("'","''",Request("Umbrella_Lia_Notes")));

$PropertyLia = Request("PropertyLia"); 
if ($PropertyLia == "checkbox") {
$PropertyLia = "1"; //"<img src='images/checked.bmp'>"
} else {
$PropertyLia = "0"; //"<img src='images/unchecked.bmp'>"
}
PropertyLia_Limit = trim(str_replace("'","''",Request("PropertyLia_Limit")));
PropertyLia_Notes = trim(str_replace("'","''",Request("PropertyLia_Notes")));


$Contractors = Request("Contractors");
if ($Contractors == "checkbox") {
$Contractors = "1"\'"<img src='images/checked.bmp'>";
} else {
$Contractors = "0"\'"<img src='images/unchecked.bmp'>";
}
Contractors_Limit = trim(str_replace("'","''",Request("Contractors_Limit")));
Contractors_Notes = trim(str_replace("'","''",Request("Contractors_Notes")));

$Other = Request("Other");
if ($Other == "checkbox") {
$Other = "1"\'"<img src='images/checked.bmp'>";
} else {
$Other = "0"\'"<img src='images/unchecked.bmp'>";
}
$Other_Limit = trim(str_replace("'","''",Request("Other_Limit")));
$Other_Notes = trim(str_replace("'","''",Request("Other_Notes")));

Sp_Additional_Insure = Request("Sp_Additional_Insure");
Sp_Additional_Insure_Policies = trim(str_replace("'","''",Request("Sp_Additional_Insure_Policies")));

$Sp_Waiver = Request("Sp_Waiver");
Sp_Waiver_Policies = trim(str_replace("'","''",Request("Sp_Waiver_Policies")));

$Sp_Loss = Request("Sp_Loss");
$Sp_Loss_Policies = trim(str_replace("'","''",Request("Sp_Loss_Policies")));

Sp_Notice_Cancellation = Request("Sp_Notice_Cancellation");

Other_Instructions = trim(str_replace("'","''",Request("Other_Instructions")));

$Auto = trim(str_replace("'","''",Request("Auto")));
$Vin = trim(str_replace("'","''",Request("Vin")));
$CostNew = trim(str_replace("'","''",Request("CostNew")));

if ($Ins_Date != "") {
$sql = "Insert into tblGenCerti(Ins_Name,Ins_Contact,Ins_Date,Ins_Phone,Cer_Name,Cer_Address,Cer_City,Cer_State,Cer_Zip,Cer_Email,Cer_Att,Cer_FaxTo,Cer_Phone,Cer_Fax,Gen_Lia,Gen_Lia_Limit,Gen_Lia_Notes,Auto_Lia,Auto_Lia_Limit,Auto_Lia_Notes,Workers_Comp,Workers_Comp_Limit,Workers_Comp_Notes,Umbrella_Lia,Umbrella_Lia_Limit,Umbrella_Lia_Notes,Property,Property_Limit,Property_Notes,Contractors,Contractors_Limit,Contractors_Notes,Other,Other_Limit,Other_Notes,Sp_Additional_Insure,Sp_Additional_Insure_Policies,Sp_Waiver,Sp_Waiver_Policies,Sp_Loss,Sp_Loss_Policies,Sp_Notice_Cancellation,Other_Instructions,Auto,Vin,CostNew) values "._;
	"('".$Ins_Name."','".$Ins_Contact."','".$Ins_Date."','".$Ins_Phone."','".$Cer_Name."','".$Cer_Address."','".$Cer_City."','".$Cer_State."','".$Cer_Zip."','".$Cer_Email."','".$Cer_Att."','".$Cer_FaxTo."','".$Cer_Phone."','".$Cer_Fax."','".$Gen_Lia."','".$Gen_Lia_Limit."','".$Gen_Lia_Notes."','".$Auto_Lia."','".$Auto_Lia_Limit."','".$Auto_Lia_Notes."','".$Workers_Comp."','".Workers_Comp_Limit."','".Workers_Comp_Notes."','".$Umbrella_Lia."','".Umbrella_Lia_Limit."','".Umbrella_Lia_Notes."','".$PropertyLia."','".PropertyLia_Limit."','".PropertyLia_Notes."','".$Contractors."','".Contractors_Limit."','".Contractors_Notes."','".$Other."','".$Other_Limit."','".$Other_Notes."','".Sp_Additional_Insure."','".Sp_Additional_Insure_Policies."','".$Sp_Waiver."','".Sp_Waiver_Policies."','".$Sp_Loss."','".$Sp_Loss_Policies."','".Sp_Notice_Cancellation."','".Other_Instructions."','".$Auto."','".$Vin."','".$CostNew."')";
} else {
$sql = "Insert into tblGenCerti(Ins_Name,Ins_Contact,Ins_Phone,Cer_Name,Cer_Address,Cer_City,Cer_State,Cer_Zip,Cer_Email,Cer_Att,Cer_FaxTo,Cer_Phone,Cer_Fax,Gen_Lia,Gen_Lia_Limit,Gen_Lia_Notes,Auto_Lia,Auto_Lia_Limit,Auto_Lia_Notes,Workers_Comp,Workers_Comp_Limit,Workers_Comp_Notes,Umbrella_Lia,Umbrella_Lia_Limit,Umbrella_Lia_Notes,Property,Property_Limit,Property_Notes,Contractors,Contractors_Limit,Contractors_Notes,Other,Other_Limit,Other_Notes,Sp_Additional_Insure,Sp_Additional_Insure_Policies,Sp_Waiver,Sp_Waiver_Policies,Sp_Loss,Sp_Loss_Policies,Sp_Notice_Cancellation,Other_Instructions,Auto,Vin,CostNew) values "._;
	"('".$Ins_Name."','".$Ins_Contact."','".$Ins_Phone."','".$Cer_Name."','".$Cer_Address."','".$Cer_City."','".$Cer_State."','".$Cer_Zip."','".$Cer_Email."','".$Cer_Att."','".$Cer_FaxTo."','".$Cer_Phone."','".$Cer_Fax."','".$Gen_Lia."','".$Gen_Lia_Limit."','".$Gen_Lia_Notes."','".$Auto_Lia."','".$Auto_Lia_Limit."','".$Auto_Lia_Notes."','".$Workers_Comp."','".Workers_Comp_Limit."','".Workers_Comp_Notes."','".$Umbrella_Lia."','".Umbrella_Lia_Limit."','".Umbrella_Lia_Notes."','".$PropertyLia."','".PropertyLia_Limit."','".PropertyLia_Notes."','".$Contractors."','".Contractors_Limit."','".Contractors_Notes."','".$Other."','".$Other_Limit."','".$Other_Notes."','".Sp_Additional_Insure."','".Sp_Additional_Insure_Policies."','".$Sp_Waiver."','".Sp_Waiver_Policies."','".$Sp_Loss."','".$Sp_Loss_Policies."','".Sp_Notice_Cancellation."','".Other_Instructions."','".$Auto."','".$Vin."','".$CostNew."')";
}

//Response.Write sql
//Response.End

on error resume ;}
$conn.execute $sql;
if ($err.$number!=0) {
$strMessage = $err.$Description;
} else {
call sendMail;
}

function sendMail {
if ($Gen_Lia == "1") {
	$Gen_Lia = "<Input type=checkbox checked name=Gen_Lia disabled>";
} else {
	$Gen_Lia = "<Input type=checkbox name=Gen_Lia disabled>";
}	

if ($Auto_Lia == "1") {
	$Auto_Lia = "<Input type=checkbox checked name=Auto_Lia disabled>";
} else {
	$Auto_Lia = "<Input type=checkbox name=Auto_Lia disabled>";
}	

if ($Workers_Comp == "1") {
	$Workers_Comp = "<Input type=checkbox checked name=Workers_Lia disabled>";
} else {
	$Workers_Comp = "<Input type=checkbox name=Workers_Lia disabled>";
}	
if ($Umbrella_Lia == "1") {
	$Umbrella_Lia = "<Input type=checkbox checked name=Umbrella_Lia disabled>";
} else {
	$Umbrella_Lia = "<Input type=checkbox name=Umbrella_Lia disabled>";
}	

if ($PropertyLia == "1") {
	$PropertyLia = "<Input type=checkbox checked name=PropertyLia disabled>";
} else {
	$PropertyLia = "<Input type=checkbox name=PropertyLia disabled>";
}	

if ($Contractors == "1") {
	$Contractors = "<Input type=checkbox checked name=Contents disabled>";
} else {
	$Contractors = "<Input type=checkbox name=Contents disabled>";
}	

if ($Other == "1") {
	$Other = "<Input type=checkbox checked name=Other disabled>";
} else {
	$Other = "<Input type=checkbox name=Others disabled>";
}	

$strBody = "<HTML><BODY>";
$strBody = $strBody."<TABLE width='95%' border=1 cellspacing=0 cellpadding=2 style='border:border-collapse'>";
$strBody = $strBody."<TR><TD align=center bgcolor='#c1c1c1'><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."<B>General Certificate</B>";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD align=center bgcolor='#EFEFEF'><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."<B>Insured Information</B>";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><TABLE width='100%' border=1 cellspacing=0 cellpadding=2 bordercolor='#C1C1C1'><TR><TD width='30%'><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Name";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Ins_Name." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Contact";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Ins_Contact." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Date";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Ins_Date." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Phone"." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Ins_Phone." ";
$strBody = $strBody."</FONT></TD></TR></TABLE></TD></TR>";

$strBody = $strBody."<TR><TD align=center bgcolor='#EFEFEF'><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."<B>Certificate Holder Information</B>";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><TABLE width='100%' border=1 cellspacing=0 cellpadding=2 bordercolor='#C1C1C1'><TR><TD width='30%'><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Name"; 
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Cer_Name." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Address";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Cer_Address." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."City";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Cer_City." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."State";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Cer_State." ".$Cer_Zip." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Email";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Cer_Email." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Attention";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Cer_Att." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Phone";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Cer_Phone." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Fax";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Cer_Fax." ";
$strBody = $strBody."</FONT></TD></TR></TABLE></TD></TR>";

$strBody = $strBody."<TR><TD align=center>";
$strBody = $strBody."<TABLE border=1 cellspacing=0 cellpadding=2 bordercolor='#c1c1c1'>";
$strBody = $strBody."<TR bgcolor='#EFEFEF'><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."<B>Type Of Insurance Required</B>";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."<B>Mark Coverages to be Included with an 'X'</B>";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."<B>Limits Required</B>";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."<B>Notes</B>";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."General Liability";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Gen_Lia." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Gen_Lia_Limit." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Gen_Lia_Notes." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Auto Liability";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Auto_Lia." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Auto_Lia_Limit." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Auto_Lia_Notes." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Workers Compensation";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Workers_Comp." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.Workers_Comp_Limit." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.Workers_Comp_Notes." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Umbrella/Excess Liability";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Umbrella_Lia." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.Umbrella_Lia_Limit." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.Umbrella_Lia_Notes." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Property";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$PropertyLia." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.PropertyLia_Limit." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.PropertyLia_Notes." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Contractors";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Contractors." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.Contractors_Limit." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.Contractors_Notes." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Other Describe";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Other." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Other_Limit." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Other_Notes." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."</TABLE></TD></TR>";

$strBody = $strBody."<TR><TD align=center bgcolor='#EFEFEF'><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."<B>Special Requirements</B>";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD>";
$strBody = $strBody."<TABLE width='100%' cellspacing=0 cellpadding=2 border=1 bordercolor='#c1C1C1'>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Additional Insured";
$strBody = $strBody."</FONT></TD>";
if (Sp_Additional_Insure == "Yes") {
	Sp_Additional_Insure = "<input type=radio checked>Yes";
} elseif	Sp_Additional_Insure = "No" then;
	Sp_Additional_Insure = "<input type=radio>No";
} else {
	Sp_Additional_Insure = "Not attended";	
}
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.Sp_Additional_Insure." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'> Policies this applies to : ";
$strBody = $strBody.Sp_Additional_Insure_Policies." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Waiver of Subrogation";
$strBody = $strBody."</FONT></TD>";
if ($Sp_Waiver == "Yes") {
	$Sp_Waiver = "<input type=radio checked id=radio1 name=radio1>Yes";
} elseif	$Sp_Waiver = "No" then;
	$Sp_Waiver = "<input type=radio id=radio1 name=radio1>No";
} else {
	$Sp_Waiver = "Not attended";	
}
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Sp_Waiver." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'> Policies this applies to : ";
$strBody = $strBody.Sp_Waiver_Policies." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Loss Payee";
$strBody = $strBody."</FONT></TD>";
if ($Sp_Loss == "Yes") {
	$Sp_Loss = "<input type=radio checked id=radio1 name=radio1>Yes";
} elseif	$Sp_Loss = "No" then;
	$Sp_Loss = "<input type=radio id=radio1 name=radio1>No";
} else {
	$Sp_Loss = "Not attended";	
}
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Sp_Loss." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'> Policies this applies to : ";
$strBody = $strBody.$Sp_Loss_Policies." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."Notice of Cancellation";
$strBody = $strBody."</FONT></TD>";
if (Sp_Notice_Cancellation == "10") {
	Sp_Notice_Cancellation = "<input type=radio checked id=radio1 name=radio1>10";
} elseif	Sp_Notice_Cancellation = "30" then;
	Sp_Notice_Cancellation = "<input type=radio id=radio1 name=radio1>30";
} else {
	Sp_Notice_Cancellation = "Not attended";	
}
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.Sp_Notice_Cancellation." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD><FONT face='verdana,arial' size='1'>";
$strBody = $strBody." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."</TABLE>";
$strBody = $strBody."</TD></TR>";

$strBody = $strBody."<TR><TD align=center bgcolor='#EFEFEF'><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."<B>Other Instructions</B>";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD align=left><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.Other_Instructions." ";
$strBody = $strBody."</FONT></TD></TR>";

$strBody = $strBody."<TR><TD>";
$strBody = $strBody."<TABLE width='100%' cellspacing=0 cellpadding=2 border=1 bordercolor='#c1C1C1'>";
$strBody = $strBody."<TR><TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."AUTO";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."VIN#";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody."COST NEW";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."<TR><TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Auto." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$Vin." ";
$strBody = $strBody."</FONT></TD>";
$strBody = $strBody."<TD align=center><FONT face='verdana,arial' size='1'>";
$strBody = $strBody.$CostNew." ";
$strBody = $strBody."</FONT></TD></TR>";
$strBody = $strBody."</TABLE>";
$strBody = $strBody."</TD></TR></TABLE>";
$strBody = $strBody."</BODY></HTML>";

set $myMail = server.CreateObject("CDONTS.NewMail");

if (not $myMail $is nothing) {
	$myMail.To = $Cer_Email;
	$myMail.$cc = "klaca@mackinsurance.com,support@s2corp.net";
	$myMail.$From = "automail@mackgroup.com"; 
	$myMail.$Subject = "General Certificate";
	$myMail.$BodyFormat = 0;
	$myMail.$MailFormat = 0;
	$myMail.$Body = $strBody;
	$myMail.$Send;
	if ($err.$Description!="") {
		$strMessage = $err.$Description;
	} else {
		$strMessage = "Thank you for your time in submitting this certificate of insurance form. A Mack Insurance Group representative will respond to your submission as soon as possible.";	
	}
	set $myMail = nothing;			
} else {
	$strMessage = "Error in mail object creation";
}
}
with Response;
.Write "<center>";
.Write "<Font face='verdana,arial' size=2><I>";
.Write $strMessage;
.Write "</I></FONT><br><br>";
.Write "</center>";
end with;

echo $strBody."<br>";
?>undefined<? Server.Execute("mt/track.asp") ?>undefined

 

I've fixed the original issue, where it wouldn't continue to the next page (thankyou.php), it now registers but gives me this:

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in D:\Hosting\4154872\html\mack\thankyou.php on line 132

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in D:\Hosting\4154872\html\mack\thankyou.php on line 132

 

Wha??

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.