This is the entire form:
<form action="multi-insurance-quote-test.php" method="post" id="auto-form">
<div id="form-top">
<h2>Save time & Money</h2>
<h3>Fillout 1 form and recieve 2 quotes</h3>
<strong>Please select the insurance(s) for which you would like to receive a quote(s).</strong><br/>
<br/>
<input type="checkbox" name="includeAutoQuote"
id="includeAutoQuote" value="includeAutoQuote" <?php if( isset($_POST['includeAutoQuote']) ) echo 'checked'; ?> />
Auto
<input type="checkbox" name="includeHomeQuote" id="includeHomeQuote" value="includeHomeQuote" <?php if( isset($_POST['includeHomeQuote']) ) echo 'checked'; ?> />
Homeowners/Renters </div> <div id="form-bottom"> <div id="form-validation">
<?php
if ( isset($_POST['includeAutoQuote']) && ($_POST['includeAutoQuote'] == 'includeAutoQuote') )
{
$name = $_POST['name'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$email = $_POST['email'];
$license_number = $_POST['license_number'];
$dob = $_POST['dob'];
$first_license = $_POST['first_license'];
$vin_number = $_POST['vin_number'];
$vehicle_make = $_POST['vehicle_make'];
$vehicle_model = $_POST['vehicle_model'];
$vehicle_year = $_POST['vehicle_year'];
$uninsured_motorist = $_POST['uninsured_motorist'];
$property_damage = $_POST['property_damage'];
$bodily_injury = $_POST['bodily_injury'];
$underinsured_motorist = $_POST['underinsured_motorist'];
$mileage = $_POST['mileage'];
$city_garaged = $_POST['city_garaged'];
$errorstring = "";
if (!$name)
$errorstring = $errorstring."Name<br>";
if (!$phone)
$errorstring = $errorstring."Phone #<br>";
if (!$address)
$errorstring = $errorstring."Address<br>";
if (!$email)
$errorstring = $errorstring."Email<br>";
if (!$license_number)
$errorstring = $errorstring."License Number<br>";
if (!$dob)
$errorstring = $errorstring."D.O.B.<br>";
if (!$first_license)
$errorstring = $errorstring."Year you received your first license<br>";
if (!$vin_number)
$errorstring = $errorstring."VIN Number<br>";
if (!$vehicle_make)
$errorstring = $errorstring."Vehicle Make<br>";
if (!$vehicle_model)
$errorstring = $errorstring."Vehicle Model<br>";
if (!$vehicle_year)
$errorstring = $errorstring."Vehicle Year<br>";
if (!$uninsured_motorist)
$errorstring = $errorstring."Uninsured Motorist<br>";
if (!$property_damage)
$errorstring = $errorstring."Property Damage<br>";
if (!$bodily_injury)
$errorstring = $errorstring."Bodily Injury<br>";
if (!$underinsured_motorist)
$errorstring = $errorstring."Underinsured Motorist<br>";
if (!$mileage)
$errorstring = $errorstring."Mileage<br>";
if (!$city_garaged)
$errorstring = $errorstring."What city is the vehicle garaged in?t<br>";
if ($errorstring!="")
echo "<h3>Please fill out the following Auto form fields</h3>$errorstring<br>";
else
{
//run code
echo "<h3>Thank you. Your auto quote request has been sent.</h3>";
}
}
?>
<?php
if ( isset($_POST['includeHomeQuote']) && ($_POST['includeHomeQuote'] == 'includeHomeQuote') )
{
$name = $_POST['name'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$email = $_POST['email'];
$type_of_insurance = $_POST['type_of_insurance'];
$number_of_units = $_POST['number_of_units'];
$square_footage = $_POST['square_footage'];
$year_built = $_POST['year_built'];
$current_insurance_company = $_POST['current_insurance_company'];
$amps = $_POST['amps'];
$does_owner_live_on_property = $_POST['does_owner_live_on_property'];
$new_or_existing_residence = $_POST['new_or_existing_residence'];
$type_of_structure = $_POST['type_of_structure'];
$heating_source = $_POST['heating_source'];
$coverage_cancelled = $_POST['coverage_cancelled'];
$errorstring = "";
if (!$name)
$errorstring = $errorstring."Name<br>";
if (!$phone)
$errorstring = $errorstring."Phone #<br>";
if (!$address)
$errorstring = $errorstring."address<br>";
if (!$email)
$errorstring = $errorstring."email<br>";
if (!$type_of_insurance)
$errorstring = $errorstring."Type of insurance<br>";
if (!$number_of_units)
$errorstring = $errorstring."Number of units<br>";
if (!$square_footage)
$errorstring = $errorstring."Square footage<br>";
if (!$year_built)
$errorstring = $errorstring."Year built<br>";
if (!$current_insurance_company)
$errorstring = $errorstring."Current insurance company<br>";
if (!$amps)
$errorstring = $errorstring."I verify that the electrical system is circuit breakers and at least 100 amps<br>";
if (!$does_owner_live_on_property)
$errorstring = $errorstring."Does the owner live on the property?<br>";
if (!$new_or_existing_residence)
$errorstring = $errorstring."New or existing property?<br>";
if (!$type_of_structure)
$errorstring = $errorstring."Type of structure<br>";
if (!$heating_source)
$errorstring = $errorstring."Heating source<br>";
if (!$coverage_cancelled)
$errorstring = $errorstring."Has your coverage been cancelled in the last three years?<br>";
if ($errorstring!="")
echo "<h3>Please fill out the following Homeowners form fields</h3>$errorstring<br>";
else
{
//run code
echo "<h3>Thank you. Your homeowners quote request has been sent.</h3>";
}
}
?>
<?php
/* Subject and Email Variables */
$subject = 'Insurance Quote Request';
$to = 'samuel@searchtransparencysem.com';
/* Gathering Data Variables */
$type_of_insurance = $_POST['type_of_insurance'];
$name = $_POST['name'];
$address = $_POST['address'];
$ssn = $_POST['ssn'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$number_of_units = $_POST['number_of_units'];
$square_footage = $_POST['square_footage'];
$year_built = $_POST['year_built'];
$city_garaged = $_POST['city_garaged'];
$pets = $_POST['pets'];
$updates = $_POST['updates'];
$current_insurance_company = $_POST['current_insurance_company'];
$why_was_policy_cancelled = $_POST['why_was_policy_cancelled'];
$paid_losses = $_POST['paid_losses'];
$amps = $_POST['amps'];
$does_owner_live_on_property = $_POST['does_owner_live_on_property'];
$new_or_existing_residence = $_POST['new_or_existing_residence'];
$type_of_structure = $_POST['type_of_structure'];
$heating_source = $_POST['heating_source'];
$coverage_cancelled = $_POST['coverage_cancelled'];
$license_number = $_POST['license_number'];
$dob = $_POST['dob'];
$first_license = $_POST['first_license'];
$vin_number = $_POST['vin_number'];
$vehicle_make = $_POST['vehicle_make'];
$vehicle_model = $_POST['vehicle_model'];
$vehicle_year = $_POST['vehicle_year'];
$uninsured_motorist = $_POST['uninsured_motorist'];
$property_damage = $_POST['property_damage'];
$bodily_injury = $_POST['bodily_injury'];
$medical_payments = $_POST['medical_payments'];
$collision_deductible = $_POST['collision_deductible'];
$limited_collision_deductible = $_POST['limited_collision_deductible'];
$comprehensive_deductible = $_POST['comprehensive_deductible'];
$substitute_transportation = $_POST['substitute_transportation'];
$towing_and_labor = $_POST['towing_and_labor'];
$underinsured_motorist = $_POST['underinsured_motorist'];
$mileage = $_POST['mileage'];
$alarm = $_POST['alarm'];
$airbags = $_POST['airbags'];
$lojack = $_POST['lojack'];
$onstar = $_POST['onstar'];
$auto_remarks = $_POST['auto_remarks'];
$home_remarks = $_POST['home_remarks'];
$body = <<<EOD
<br><hr><br>
<h1>Insurance Quote Request</h1>
<h1>Homeowners/Renters Quote Request</h1><br>
<h2>Personal Information</h2>
Name: $name <br>
Address: $address <br>
SSN: $ssn <br>
Phone: $phone <br>
Email: $email <br>
<h2>Residence</h2>
Type of insurance: $type_of_insurance <br>
Number of units: $number_of_units <br>
Square footage: $square_footage <br>
Year built: $year_built <br>
Pets: $pets <br>
Updates: $updates <br>
Current insurance company: $current_insurance_company <br>
If policy was cancelled, why?: $why_was_policy_cancelled <br>
Paid losses: $paid_losses <br>
I verify that the electrical system is circuit breakers and at least 100 amps: $amps <br>
Does the owner live on the property?: $does_owner_live_on_property <br>
New or existing property?: $new_or_existing_residence <br>
Type of structure: $type_of_structure <br>
Heating source: $heating_source <br>
Has your coverage been cancelled in the last three years?: $coverage_cancelled <br>
Remarks: $home_remarks <br>
<h1>Auto Quote Request</h1><br><br>
<h2>Driver Information</h2>
License number: $license_number <br>
D.O.B.: $dob <br>
Year you received your first license: $first_license <br><br>
<h2>Vehicle Information</h2>
VIN number: $vin_number <br>
Make: $vehicle_make <br>
Model: $vehicle_model <br>
Year: $vehicle_year <br>
<h2>Coverages</h2>
Uninsured Motorist: $uninsured_motorist <br>
Property Damage: $property_damage <br>
Bodily Injury: $bodily_injury <br>
Medical Payments: $medical_payments <br>
Collison Deductible: $collision_deductible <br>
Limitied Collison Deductible: $limited_collision_deductible <br>
Comprehensive Deductible: $comprehensive_deductible <br>
Substitute Transportation: $substitute_transportation <br>
Towing and Labor: $towing_and_labor <br>
Underinsured Motorist: $underinsured_motorist <br>
Mileage: $mileage <br>
What city is the vehicle garaged in?: $city_garaged <br><br>
<h3>Options that your vehicle is equiped with</h3>
Alarm: $alarm <br>
Airbags: $airbags <br>
LoJack: $lojack <br>
OnStar: $onstar <br>
Remarks: $auto_remarks <br>
EOD;
$headers = "From: $email\\r\
";
$headers = "Content-type: text/html\\r\
";
mail($to,$subject,$body,$headers);
?>
</div> <div id="top-top-form"> <div id="form-bottom-left">
<label>Name*<br/>
<input name="name" type="text" class="text-field-home-narrow" id="name" value="<?php echo $name; ?>" />
</label>
<br/>
<label>Address*<br/>
<input name="address" type="text" class="text-field-home-narrow" id="address" value="<?php echo $address; ?>" />
</label>
<br/>
</div> <div id="form-bottom-right">
<label>Phone #*<br/>
<input name="phone" type="text" class="text-field-home-narrow" id="phone" value="<?php echo $phone; ?>" />
</label>
<br/>
<label>Email*<br/>
<input name="email" type="text" class="text-field-home-narrow" id="email" value="<?php echo $email; ?>" />
</label>
<br/>
</div> </div> <div id="auto">
<h2>Auto</h2>
<div id="form-bottom-left">
<label>License #*<br/>
<input name="license number" type="text" class="text-field-home-narrow" id="license number" value="<?php echo $license_number; ?>" />
</label>
<br/>
<label>D.O.B.*<br/>
<input name="dob" type="text" class="text-field-home-narrow" id="dob" value="<?php echo $dob; ?>" />
</label>
</div> <div id="form-bottom-right">
<label>Year you receved your first license*<br/>
<input name="first license" type="text" class="text-field-home-narrow" id="first license" value="<?php echo $first_license; ?>" />
</label>
<br/>
<label>VIN # (listed on vehicle registration)*<br/>
<input name="vin number" type="text" class="text-field-home-narrow" id="vin number" value="<?php echo $vin_number; ?>" />
</label>
</div> <div id="form-bottom-bottom"><br/>
<strong>Vehicle</strong><br/>
<br/>
<label>Make*
<input name="vehicle make" type="text" class="text-field-home-short" id="vehicle make" value="<?php echo $vehicle_make; ?>" />
</label>
Model*
<input name="vehicle model" type="text" class="text-field-home-short" id="vehicle model" value="<?php echo $vehicle_model; ?>" />
</label>
<label>Year*
<input name="vehicle year" type="text" class="text-field-home-short" id="vehicle year" value="<?php echo $vehicle_year; ?>" />
</label>
<br/>
<br/>
<label>What city is your vehicle garaged in?*<br/>
<input name="city garaged" type="text" class="text-field-home-narrow" id="city garaged" value="<?php echo $city_garaged; ?>" />
</label>
<br/>
<label>Total mileage on vehicle?*<br/>
<input name="mileage" type="text" class="text-field-home-narrow" id="mileage" value="<?php echo $mileage; ?>" />
</label>
<br/>
<br/>
<h3>Please select the amount(s) of your current/desired coverages</h3>
<strong>Uninsured Motorist</strong>*<br/>
<label>
<input type="radio" name="uninsured motorist" value="$20,000/$40,000" id="uninsured motorist" />
$20,000/$40,000</label>
<br/>
<label>
<input type="radio" name="uninsured motorist" value="$50,000/$100,000" id="uninsured motorist" />
$50,000/$100,000</label>
<br/>
<label>
<input type="radio" name="uninsured motorist" value="$100,000/$300,000" id="uninsured motorist" />
$100,000/$300,000</label>
<br/>
<label>
<input type="radio" name="uninsured motorist" value="$250,000/$500,000" id="uninsured motorist" />
$250,000/$500,000</label>
<br/>
<br/>
<strong>Property Damage</strong>*<br/>
<label>
<input type="radio" name="property damage" value="$100,000" id="property damage" />
$100,000</label>
<br/>
<br/>
<strong>Bodily Injury</strong>*<br/>
<label>
<input type="radio" name="bodily injury" value="$20,000/$40,000" id="bodily injury" />
$20,000/$40,000</label>
<br/>
<label>
<input type="radio" name="bodily injury" value="$50,000/$100,000" id="bodily injury" />
$50,000/$100,000</label>
<br/>
<label>
<input type="radio" name="bodily injury" value="$100,000/$300,000" id="bodily injury" />
$100,000/$300,000</label>
<br/>
<label>
<input type="radio" name="bodily injury" value="$250,000/$500,000" id="bodily injury" />
$250,000/$500,000</label>
<br/>
<br/>
<strong>Medical Payments (optional)</strong><br/>
<label>
<input type="radio" name="medical payments" value="none" id="medical payments" />
None</label>
<br/>
<label>
<input type="radio" name="medical payments" value="$5,000" id="medical payments" />
$5,000</label>
<br/>
<label>
<input type="radio" name="medical payments" value="$10,000" id="medical payments" />
$10,000</label>
<br/>
<label>
<input type="radio" name="medical payments" value="$15,000" id="medical payments" />
$15,000</label>
<br/>
<label>
<input type="radio" name="medical payments" value="$20,000" id="medical payments" />
$20,000</label>
<br/>
<label>
<input type="radio" name="medical payments" value="$25,000" id="medical payments" />
$25,000</label>
<br/>
<br/>
<strong>Collison Deductible (optional)</strong><br/>
<label>
<input type="radio" name="collision deductible" value="none" id="collision deductible" />
None</label>
<br/>
<label>
<input type="radio" name="collision deductible" value="$300" id="collision deductible" />
$300</label>
<br/>
<label>
<input type="radio" name="collision deductible" value="$500" id="collision deductible" />
$500</label>
<br/>
<label>
<input type="radio" name="collision deductible" value="$1000" id="collision deductible" />
$1000</label>
<br/>
<br/>
<strong>Limited Collison Deductible (optional)</strong><br/>
<label>
<input type="radio" name="limited collison deductible" value="none" id="limited collison deductible" />
None</label>
<br/>
<label>
<input type="radio" name="limited collison deductible" value="$0" id="limited collison deductible" />
$0</label>
<br/>
<label>
<input type="radio" name="limited collison deductible" value="$300" id="limited collison deductible" />
$300</label>
<br/>
<label>
<input type="radio" name="limited collison deductible" value="$500" id="limited collison deductible" />
$500</label>
<br/>
<label>
<input type="radio" name="limited collison deductible" value="$1,000" id="limited collison deductible" />
$1,000</label>
<br/>
<br/>
<strong>Comprehensive Deductible (optional)</strong><br/>
<label>
<input type="radio" name="comprehensive deductible" value="none" id="comprehensive deductible" />
None</label>
<br/>
<label>
<input type="radio" name="comprehensive deductible" value="$300" id="comprehensive deductible" />
$300</label>
<br/>
<label>
<input type="radio" name="comprehensive deductible" value="$500" id="comprehensive deductible" />
$500</label>
<br/>
<label>
<input type="radio" name="comprehensive deductible" value="$1,000" id="comprehensive deductible" />
$1,000</label>
<br/>
<br/>
<strong>Substitute Transportation (optional)</strong><br/>
<label>
<input type="radio" name="substitute transportation" value="none" id="substitute transportation" />
None</label>
<br/>
<label>
<input type="radio" name="substitute transportation" value="$15/$450" id="substitute transportation" />
$15/$450</label>
<br/>
<label>
<input type="radio" name="substitute transportation" value="$30/$900" id="substitute transportation" />
$30/$900</label>
<br/>
<label>
<input type="radio" name="substitute transportation" value="$45/$1350" id="substitute transportation" />
$45/$1350</label>
<br/>
<label>
<input type="radio" name="substitute transportation" value="$100/$3000" id="substitute transportation" />
$100/$3000</label>
<br/>
<br/>
<strong>Towing and Labor (optional)</strong><br/>
<label>
<input type="radio" name="towing and labor" value="none" id="towing and labor" />
None</label>
<br/>
<label>
<input type="radio" name="towing and labor" value="$50" id="towing and labor" />
$50</label>
<br/>
<label>
<input type="radio" name="towing and labor" value="$100" id="towing and labor" />
$100</label>
<br/>
<br/>
<strong>Underinsured Motorist</strong>*<br/>
<label>
<input type="radio" name="underinsured motorist" value="$20,000/$40,000" id="underinsured motorist" />
$20,000/$40,000</label>
<br/>
<label>
<input type="radio" name="underinsured motorist" value="$50,000/$100,000" id="underinsured motorist" />
$50,000/$100,000</label>
<br/>
<label>
<input type="radio" name="underinsured motorist" value="$100,000/$300,000" id="underinsured motorist" />
$100,000/$300,000</label>
<br/>
<label>
<input type="radio" name="underinsured motorist" value="$250,000/$500,000" id="underinsured motorist" />
$250,000/$500,000</label>
<br/>
<br/>
<br/>
<h3>Please check any options that your vehicle is equiped with</h3>
<input type="checkbox" name="alarm" value="Yes" id="alarm" />
Alarm
</label>
<br/>
<label>
<input type="checkbox" name="airbags" value="Yes" id="airbags" />
Airbags</label>
<br/>
<label>
<input type="checkbox" name="guidepoint" value="Yes" id="guidepoint" />
GuidePoint</label>
<br/>
<label>
<input type="checkbox" name="lojack" value="Yes" id="lojack" />
LoJack</label>
<br/>
<label>
<input type="checkbox" name="onstar" value="Yes" id="onstar" />
OnStar</label>
<br/>
<br/>
<label>Questions/Comments<br/>
<textarea name="auto remarks" id="auto remarks" value="<?php echo $auto_remarks; ?>" cols="45" rows="5"></textarea>
</label>
<br/>
<br/>
</div> </div> <div id="home"> <div id="form-bottom-left"><br/>
<h2>Residence</h2>
<h3>Type of Insurance*</h3>
<label>
<input type="radio" name="type of insurance" value="Homeowners" id="type of insurance" />
Homeowners</label>
<br/>
<label>
<input type="radio" name="type of insurance" value="Condo" id="type of insurance" />
Condo</label>
<br/>
<label>
<input type="radio" name="type of insurance" value="Renters" id="type of insurance" />
Renters</label>
<br/>
<br/>
<label>
Social Security # (optional) <div id="disclaimer">
<li>Disclaimer
<ul>
<li>To accurately quote your auto insurance a social security number is necessary. Insurance companies reserve the right to reject your policy due to bad credit.</li>
</ul>
</li>
<br/>
</div>
<input name="ssn" type="password" class="text-field-home-narrow" id="ssn" value="<?php echo $ssn; ?>" />
</label>
<br/>
<label>How many units are in the building?*<br/>
<input name="number of units" type="text" class="text-field-home-narrow" id="number of units" value="<?php echo $number_of_units; ?>" />
</label>
<br/>
<label>Square footage?*<br/>
<input name="square footage" type="text" class="text-field-home-narrow" id="square footage" value="<?php echo $square_footage; ?>" />
</label>
<br/>
<label>Year built?*<br/>
<input name="year built" type="text" class="text-field-home-narrow" id="year built" value="<?php echo $year_built; ?>" />
</label>
<br/>
</div> <div id="form-bottom-bottom"><br/>
<label>Please list any pets and their breed:<br/>
<input name="pets" type="text" class="text-field-home" id="pets" value="<?php echo $pets; ?>" />
</label>
<br/>
<label>Please list any update(s) to property including year of update: <br/>
( e.g. electric, roof, plumbing, heating)<br/>
<input name="updates" type="text" class="text-field-home" id="updates" value="<?php echo $updates; ?>" />
</label>
<br/>
<label>Current insurance company?*<br/>
<input name="current insurance company" type="text" class="text-field-home" id="current insurance company" value="<?php echo $current_insurance_company; ?>" />
</label>
<br/>
<label>If policy was cancelled, why?<br/>
<input name="why was policy cancelled" type="text" class="text-field-home" id="why was policy cancelled" value="<?php echo $why_was_policy_cancelled; ?>" />
</label>
<br/>
<label>Please list any and all paid losses within the last three years<br/>
<input name="paid losses" type="text" class="text-field-home" id="paid losses" value="<?php echo $paid_losses; ?>" />
</label>
<br/>
<br/>
<label>
<input type="checkbox" name="amps" value="Yes" id="amps" />
I verify that the electrical system is circuit breakers and at least 100 amps*</label>
<br/>
<br/>
<strong><br/>
Does the owner live on the property?</strong>*
<p>
<label>
<input type="radio" name="does owner live on property" value="Yes" id="does owner live on property" />
Yes</label>
<br />
<label>
<input type="radio" name="does owner live on property" value="No" id="does owner live on property" />
No</label>
<br />
</p>
<strong>Is this a new or existing residence?</strong>*
<p>
<label>
<input type="radio" name="new or existing residence" value="New" id="new or existing residence" />
New</label>
<br />
<label>
<input type="radio" name="new or existing residence" value="Existing" id="new or existing residence" />
Existing</label>
<br />
</p>
<strong>What type of structure?</strong>*
<p>
<label>
<input type="radio" name="type of structure" value="Wood" id="type of structure" />
Wood</label>
<br />
<label>
<input type="radio" name="type of structure" value="Brick" id="type of structure" />
Brick</label>
<br />
</p>
<strong>What is your heating source?</strong>*
<p>
<label>
<input type="radio" name="heating source" value="Gas" id="heating source" />
Gas</label>
<br />
<label>
<input type="radio" name="heating source" value="Oil" id="heating source" />
Oil</label>
<br />
</p>
<strong>Has your coverage been cancelled in the last three years?</strong>*
<p>
<label>
<input type="radio" name="coverage cancelled" value="Yes" id="coverage cancelled" />
Yes</label>
<br />
<label>
<input type="radio" name="coverage cancelled" value="No" id="coverage cancelled" />
No</label>
<br />
</p>
<label>Questions/Comments<br/>
<textarea name="home remarks" id="home remarks" value="<?php echo $home_remarks; ?>" cols="45" rows="5"></textarea>
</label>
<br/>
<br/>
</div> </div> <div id="submit-button">
<input type="image" src="images/submit-button.jpg" name="submit" id="submit" value="Submit" /><br/><br/><p class="aterick">All fields marked with * are required</p>
</div> </div>
</form>