***** PLEASE USE PHP CODE TAG *****
Code: Select all
<?php header("Location: ../contactthank.php");
?>
<?PHP
$field_Type = $_POST['field_Type'];
$field_Service_Provider = $_POST['field_Service_Provider'];
$field_Brand = $_POST['field_Brand'];
$field_Model = htmlspecialchars($_POST['field_Model']);
$field_Size = $_POST['field_Size'];
$field_Accessories = $_POST['field_Accessories'];
$field_Condition = $_POST['field_Condition'];
$field_FirstName = htmlspecialchars($_POST['field_FirstName']);
$field_LastName = htmlspecialchars($_POST['field_LastName']);
$field_Email = $_POST['field_Email'];
$field_ZipCode = (int)$_POST['field_ZipCode'];
$field_Comments = $_POST['field_Comments'];
?>
<?php $reference = (rand(100000000000,99900000000000));
echo $reference;
?>
<?php
$to = "johndoe@mail.com";
$subject = "Cell Phone Form Submission# $reference";
$headers = "From: $field_Email\n";
$message = '<html>
<head>
<title>Cell Phone Form Submission</title>
</head>
<body>
<h1>Thank you for trying us! We will get back to you shortly</h1>
<table border="1">
<tr>
<td>Reference#</td>
<td>' . $reference . '</td>
</tr>
<tr>
<td>I want to</td>
<td><b>Sell</b></td>
</tr>
<tr>
<td>Service Provider</td>
<td>' . $field_Service_Provider . '</td>
</tr>
<tr>
<td>Model</td>
<td>' . $field_Model . '</td>
</tr>
<tr>
<td>Size</td>
<td> ' . $field_Size . '</td>
</tr>
<tr>
<td>Accessories</td>
<td>' . $field_Accessories . '</td>
</tr>
<tr>
<td>Condition</td>
<td>' . $field_Condition . '</td>
</tr>
<tr>
<td>Name</td>
<td>' . $field_FirstName . " " . $field_LastName . '</td>
</tr>
<tr>
<td>Email</td>
<td>' . $field_Email . '</td>
</tr>
<tr>
<td>Zip Code</td>
<td>' . $field_ZipCode . '</td>
</tr>
<tr>
<td>Comments</td>
<td>' . $field_Comments . '</td>
</tr>
</table></body>
</html>
';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$user = "$field_Email";
$usersubject = "Cell Phone Form Submission# $reference";
$userheaders = "From: johndoe@mail.com\n";
$usermessage = '<html>
<head>
<title>Cell Phone Form Submission</title>
</head>
<body>
<h1>Thank you for trying us! We will get back to you shortly</h1>
<table border="1">
<tr>
<td>Reference#</td>
<td>' . $reference . '</td>
</tr>
<tr>
<td>I want to</td>
<td><b>Sell</b></td>
</tr>
<tr>
<td>Service Provider</td>
<td>' . $field_Service_Provider . '</td>
</tr>
<tr>
<td>Model</td>
<td>' . $field_Model . '</td>
</tr>
<tr>
<td>Size</td>
<td> ' . $field_Size . '</td>
</tr>
<tr>
<td>Accessories</td>
<td>' . $field_Accessories . '</td>
</tr>
<tr>
<td>Condition</td>
<td>' . $field_Condition . '</td>
</tr>
<tr>
<td>Name</td>
<td>' . $field_FirstName . " " . $field_LastName . '</td>
</tr>
<tr>
<td>Email</td>
<td>' . $field_Email . '</td>
</tr>
<tr>
<td>Zip Code</td>
<td>' . $field_ZipCode . '</td>
</tr>
<tr>
<td>Comments</td>
<td>' . $field_Comments . '</td>
</tr>
</table></body>
</html>
';
mail($to,$subject,$message,$headers);
mail($user,$usersubject,$usermessage,$userheaders,$headers);
?>