Are you looking for more leads? Call (888) 904-9994!
  • info@mydealerworld.com
SELL MORE NOW!
toggle menu

formprocess

<?php
if(isset($_POST[“purchasedSubmit”])){
//THIS SECTION IS FOR WHEN THE PURCHASED SECTION OF THE FORM IS FILLED OUT……….////
if(isset($_POST[“purchasedSubmit”]))
{

// Checking For Blank Fields….
if($_POST[‘dealerName’]==”” || $_POST[‘yearOfVehicle’]==”” || $_POST[‘makeOfVehicle’]==”” || $_POST[‘modelOfVehicle’]==”” || $_POST[‘startDate’]==”” || $_POST[‘endDate’]==”” || $_POST[‘trimOfVehicle’]==”” ||
$_POST[‘stockNumber’]==”” || $_POST[‘sellingPrice’]==”” || $_POST[‘downPayment’]==”” || $_POST[‘termOfVehicle’]==”” || $_POST[‘marketing’]==”” || $_POST[‘modelNumber’]==”” || $_POST[‘msrpNumber’]==”” ||
$_POST[‘monthlyPayment’]==”” || $_POST[‘lastVin’]==”” ||$_POST[‘aprAmount’]==””)
{
?>
<script type=”text/javascript”>
alert(“Please complete the text marked with an *.”); //java script telling user to fill in all required fields..
</script>
<?php
}

//THIS IS THE INFO THAT WILL BE SENT TO INDIVIDUALS IN THE EMAIL SECTION BELOW AS LONG AS ALL THE REQUIRED FIELDS ARE FILLED IN…..//////
else{

$marketing = $_POST[‘marketing’];
$dealerName = $_POST[‘dealerName’];
$startDate = $_POST[‘startDate’];
$endDate = $_POST[‘endDate’];
$vehicleYear = $_POST[‘yearOfVehicle’];
$vehicleMake = $_POST[‘makeOfVehicle’];
$vehicleModel = $_POST[‘modelOfVehicle’];
$vehicleTrim = $_POST[‘trimOfVehicle’];
$modelNumber = $_POST[‘modelNumber’];
$stockNumber = $_POST[‘stockNumber’];
$msrp = $_POST[‘msrpNumber’];
$sellingPrice = $_POST[‘sellingPrice’];
$downPayment = $_POST[‘downPayment’];
$monthlyPayment = $_POST[‘monthlyPayment’];
$lastVin = $_POST[‘lastVin’];
$aprAmount = $_POST[‘aprAmount’];
$vehicleTerm = $_POST[‘termOfVehicle’];
$rebate = $_POST[‘rebateInfo’];
$message = $_POST[‘msg’];
$message = wordwrap($message, 70);

$msrpAmount = number_format($msrp, 2, ‘.’, ‘,’);
$sellPrice = number_format($sellingPrice, 2, ‘.’, ‘,’);
$dwnPayment = number_format($downPayment, 2, ‘.’, ‘,’);
$monthPayment = number_format($monthlyPayment, 2, ‘.’, ‘,’);
$apr = number_format($aprAmount, 2, ‘.’, ‘,’);
$rebateAmount = number_format($rebate, 2, ‘.’, ‘,’);

$form_content = “—————-
What Type of Offer: New Purchase
Which Marketing Medium: $marketing
Dealership Name: $dealerName
Start Date: $startDate
End Date: $endDate
Year of Vehicle: $vehicleYear
Make of Vehicle: $vehicleMake
Model of Vehicle: $vehicleModel
Trim of Vehicle: $vehicleTrim
Model #: $modelNumber
Stock #: $stockNumber
MSRP: $$msrpAmount
Vehicle Selling Price: $$sellPrice
Down Payment on Vehicle: $$dwnPayment
‘$’XXX/ Monthly Payment: $$monthPayment
Last 6 of VIN: $lastVin
Vehicle Rebate: $$rebateAmount
Vehicle APR: $$apr
Other Notes (Rebate Info, Special Details etc): $message”;

$email_subject = “Online Offer Submission Form”;

//THIS IS THE ARRAY THAT WILL HOLD EVERYONE THAT WILL GET THE EMAIL….//////
$arrEmail = array(‘Mark <markferguson@mydealerworld.com>’, ‘Jon <jonathanvasiliou@mydealerworld.com> ‘);

//Danielle <danielleveloza@mydealerworld.com>’, ‘Joe <joewowk@mydealerworld.com>’, ‘Brittany <brittanyspring@mydealerworld.com>’,
//’Mark <markferguson@mydealerworld.com>’, ‘Abby <abbyfrey@mydealerworld.com>’, ‘Ethan <ethanrobinson@mydealerworld.com>’,
// ‘Cody <codykotsopoulos@mydealerworld.com>’, ‘Dan <danfallon@mydealerworld.com>

foreach($arrEmail as $key => $email_to)
mail($email_to, $email_subject, $form_content);

header(‘location: http://www.mydealerworld.com/thank-you-for-contacting-dealer-world/’);
}
}

}

elseif(isset($_POST[“leaseSubmit”])) {
//THIS SECTION IS FOR WHEN THE PURCHASED SECTION OF THE FORM IS FILLED OUT……….////
if(isset($_POST[“leaseSubmit”]))
{

// Checking For Blank Fields….
if($_POST[‘dealerName’]==”” || $_POST[‘yearOfVehicle’]==”” || $_POST[‘makeOfVehicle’]==”” || $_POST[‘modelOfVehicle’]==”” || $_POST[‘startDate’]==”” || $_POST[‘endDate’]==”” || $_POST[‘trimOfVehicle’]==”” ||
$_POST[‘stockNumber’]==”” || $_POST[‘sellingPrice’]==”” || $_POST[‘downPayment’]==”” || $_POST[‘termOfVehicle’]==”” || $_POST[‘marketing’]==”” || $_POST[‘modelNumber’]==”” || $_POST[‘msrpNumber’]==”” ||
$_POST[‘monthlyPayment’]==”” || $_POST[‘lastVin’]==”” ||$_POST[‘residualValue’]==”” || $_POST[‘milesPerYear’]==””)
{
?>
<script type=”text/javascript”>
alert(“Please complete the text marked with an *.”); //java script telling user to fill in all required fields..
</script>
<?php
}

//THIS IS THE INFO THAT WILL BE SENT TO INDIVIDUALS IN THE EMAIL SECTION BELOW AS LONG AS ALL THE REQUIRED FIELDS ARE FILLED IN…..//////
else{

$marketing = $_POST[‘marketing’];
$dealerName = $_POST[‘dealerName’];
$startDate = $_POST[‘startDate’];
$endDate = $_POST[‘endDate’];
$vehicleYear = $_POST[‘yearOfVehicle’];
$vehicleMake = $_POST[‘makeOfVehicle’];
$vehicleModel = $_POST[‘modelOfVehicle’];
$vehicleTrim = $_POST[‘trimOfVehicle’];
$modelNumber = $_POST[‘modelNumber’];
$stockNumber = $_POST[‘stockNumber’];
$msrp = $_POST[‘msrpNumber’];
$sellingPrice = $_POST[‘sellingPrice’];
$downPayment = $_POST[‘downPayment’];
$monthlyPayment = $_POST[‘monthlyPayment’];
$lastVin = $_POST[‘lastVin’];
$vehicleTerm = $_POST[‘termOfVehicle’];
$rebate = $_POST[‘rebateInfo’];
$message = $_POST[‘msg’];
$message = wordwrap($message, 70);
$residualValue = $_POST[‘residualValue’];
$yearPerMiles = $_POST[‘milesPerYear’];

$msrpAmount = number_format($msrp, 2, ‘.’, ‘,’);
$sellPrice = number_format($sellingPrice, 2, ‘.’, ‘,’);
$dwnPayment = number_format($downPayment, 2, ‘.’, ‘,’);
$monthPayment = number_format($monthlyPayment, 2, ‘.’, ‘,’);
$rebateAmount = number_format($rebate, 2, ‘.’, ‘,’);
$miles = number_format($yearPerMiles);
$residual = number_format($residualValue, 2, ‘.’, ‘,’);

$form_content = “——————
What Type of Offer: Leased Purchase
Which Marketing Medium: $marketing
Dealership Name: $dealerName
Start Date: $startDate
End Date: $endDate
Year of Vehicle: $vehicleYear
Make of Vehicle: $vehicleMake
Model of Vehicle: $vehicleModel
Trim of Vehicle: $vehicleTrim
Model #: $$modelNumber
Stock #: $$stockNumber
MSRP: $$msrpAmount
Vehicle Selling Price: $$sellPrice
Down Payment on Vehicle: $$dwnPayment
‘$’XXX/ Monthly Payment: $$monthPayment
Last 6 of VIN: $lastVin
Term: $vehicleTerm
Vehicle Rebate: $$rebateAmount
Residual Value: $$residual
Miles Per Year: $miles
Other Notes (Rebate Info, Special Details etc): $message”;

$email_subject = “Online Offer Submission Form”;

//THIS IS THE ARRAY THAT WILL HOLD EVERYONE THAT WILL GET THE EMAIL….//////
$arrEmail = array(‘Mark <markferguson@mydealerworld.com>’, ‘Jon <jonathanvasiliou@mydealerworld.com> ‘);

foreach($arrEmail as $key => $email_to)
mail($email_to, $email_subject, $form_content);

header(‘location: http://www.mydealerworld.com/thank-you-for-contacting-dealer-world/’);
}
}
}
elseif(isset($_POST[“usedSubmit”])){
//THIS SECTION IS FOR WHEN THE PURCHASED SECTION OF THE FORM IS FILLED OUT……….////
if(isset($_POST[“usedSubmit”]))
{

// Checking For Blank Fields….
if($_POST[‘dealerName’]==”” || $_POST[‘yearOfVehicle’]==”” || $_POST[‘makeOfVehicle’]==”” || $_POST[‘modelOfVehicle’]==”” || $_POST[‘startDate’]==”” || $_POST[‘endDate’]==”” ||
$_POST[‘stockNumber’]==”” || $_POST[‘sellingPrice’]==”” || $_POST[‘downPayment’]==”” || $_POST[‘termOfVehicle’]==”” || $_POST[‘marketing’]==”” || $_POST[‘aprAmount’]==””)
{
?>
<script type=”text/javascript”>
alert(“Please complete the text marked with an *.”); //java script telling user to fill in all required fields..
</script>
<?php
}

//THIS IS THE INFO THAT WILL BE SENT TO INDIVIDUALS IN THE EMAIL SECTION BELOW AS LONG AS ALL THE REQUIRED FIELDS ARE FILLED IN…..//////
else{

$marketing = $_POST[‘marketing’];
$dealerName = $_POST[‘dealerName’];
$startDate = $_POST[‘startDate’];
$endDate = $_POST[‘endDate’];
$vehicleYear = $_POST[‘yearOfVehicle’];
$vehicleMake = $_POST[‘makeOfVehicle’];
$vehicleModel = $_POST[‘modelOfVehicle’];
$vehicleTrim = $_POST[‘trimOfVehicle’];
$stockNumber = $_POST[‘stockNumber’];
$sellingPrice = $_POST[‘sellingPrice’];
$downPayment = $_POST[‘downPayment’];
$aprAmount = $_POST[‘aprAmount’];
$vehicleTerm = $_POST[‘termOfVehicle’];
$message = $_POST[‘msg’];
$message = wordwrap($message, 70);

$sellPrice = number_format($sellingPrice, 2, ‘.’, ‘,’);
$dwnPayment = number_format($downPayment, 2, ‘.’, ‘,’);
$apr = number_format($aprAmount, 2, ‘.’, ‘,’);
$form_content = “—————-
What Type of Offer: Used Purchase
Which Marketing Medium: $marketing
Dealership Name: $dealerName
Start Date: $startDate
End Date: $endDate
Year of Vehicle: $vehicleYear
Make of Vehicle: $vehicleMake
Model of Vehicle: $vehicleModel
Trim of Vehicle: $vehicleTrim
Stock #: $stockNumber
Vehicle Selling Price: $$sellPrice
Down Payment on Vehicle: $$dwnPayment
Term: $vehicleTerm
Vehicle APR: $$apr
Other Notes (Rebate Info, Special Details etc): $message”;

$email_subject = “Online Offer Submission Form”;

//THIS IS THE ARRAY THAT WILL HOLD EVERYONE THAT WILL GET THE EMAIL….//////
$arrEmail = array(‘Mark <markferguson@mydealerworld.com>’, ‘Jon <jonathanvasiliou@mydealerworld.com> ‘);

foreach($arrEmail as $key => $email_to)
mail($email_to, $email_subject, $form_content);

header(‘location: http://www.mydealerworld.com/thank-you-for-contacting-dealer-world/’);
}
}
}
?>

Google partner
Join the Lead Lab!