PS I think I really screwed this one up lol
Thanks,
B
- Code: Select all
<?php
/* Subject and Email variables */
$emailSubject = 'Your Car Report Info.';
$webMaster = 'me@rustyeckford.com';
$webMaster2 ='me1@rustyeckford.com';
$webMaster3 ='me2@rustyeckford.com';
/* Gathering Data Variables */
$f_nameField = $_POST['f_name'];
$l_nameField = $_POST['l_name'];
$addField = $_POST['Address'];
$stateField = $_POST['state'];
$phoneField = $_POST['phone'];
$emailField = $_POST['email'];
$vinField = $_POST['vin'];
$body = <<<EOD
<br><hr><br>
First Name: $f_name <br>
Last Name: $l_name <br>
Address: $Address <br>
State: $state <br>
Phone: $phone <br>
Email: $email <br>
VIN: $vin <br>
EOD;
switch($state) {
case 'Kansas':
case 'Oklahoma':
$wm = $webMaster2;
break;
case 'Missouri':
case 'Iowa':
$wm = $webMaster3;
break'
case 'Nebraska:
$wm = $webMaster;
break;
}
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($wm, $emailSubject, $body, $headers);
/* Results rendered from Html */
$theResults = <<<EOD
<html>
<head>
<title>Your Car Report - Results</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {
background-color: #f1f1f1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #666666;
text-decoration: none;
}
</style>
</head>
<div>
<div align="center">Thank you for your submission. Your vehicle report will be provided to you very soon!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>

