Application Response

[insert_php]

$message = “The following membership application was submitted:\n”;

$message .= “Name : ” . $_POST[‘Name’] . “\n”;
$message .= “Address : ” . $_POST[‘Street_1’] . “\n” . $_POST[‘Street_2’] . “\n” .
$_POST[‘City’] . “\n” . $_POST[‘County’] . “\n”;
$message .= “Postcode : ” . $_POST[‘PostCode’] . “\n”;
if (! empty($_POST[‘BoatName’])) {
$message .= “Boat Name : ” . $_POST[‘BoatName’] . “\n”;

}
$message .= “Phone : ” . $_POST[‘Phone’] . “\n”;
$message .= “Mobile : ” . $_POST[‘Mobile’] . “\n”;
$message .= “Email : ” . $_POST[‘Email’] . “\n”;
$message .= “Share data : ” . $_POST[‘shownames’] . “\n”;
$message .= “Allow photos : ” . $_POST[‘showphotos’] . “\n”;

if ( empty($_POST[‘Notes’])) {
$message .= “Additional Notes : None\n”;
} else{
$message .= “Additional Notes : ” . $_POST[‘Notes’] . “\n”;
}

$copyto = $_POST[‘Email’];
$cc =”;
if (filter_var($copyto, FILTER_VALIDATE_EMAIL)) {
$cc = “Cc: $copyto \r\n”;
}
$to = “membership@cutweb.org.uk”;

$headers = “From: webmaster@cutweb.org.uk \r\n”;
$headers .= $cc;
$headers .= “Bcc: webmaster@cutweb.org.uk \r\n”;
$email_subject = “Membership Application”;
$email_body = $message;

mail($to,$email_subject,$email_body,$headers);

echo “Thank you ” . $_POST[‘Name’] . ” for your submission which will be acknowledged in due course.”;

[/insert_php]