Here you go:
<?php
if(isset($_POST['email'])) {
print ' ';
print_r($_POST);
print ' ';
exit();
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "
[email protected]";
$email_subject = "Scrap/damaged/sale query";
$email_message = "Form details below.\n\n";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= "Name: ".clean_string($name)."\n";
$email_message .= "contact: ".clean_string($phone)."\n";
$email_message .= "Email: ".clean_string($email)."\n";
$email_message .= "postcode".clean_string($post)."\n";
$email_message .= "Vehicle: ".clean_string($vehicle)."\n";
$email_message .= "Reg: ".clean_string($reg)."\n";
$email_message .= "Other: ".clean_string($other)."\n";
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>
Include your own success html here
<?php
}
?>