<?php
if(isset($_POST['submit'])) {
$to = "Commandos67@gmail.com";
$subject = "Form Tutorial";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$phone_field = $_POST['phone'];
$wedding_field = $_POST['wedding'];
$notes = $_POST['notes'];
foreach($_POST['check'] as $value) {
$check_msg .= "Checked: $value\n";
}
$body = "From: $name_field\n
E-Mail: $email_field\n
Phone: $phone_field\n
Wed Date: $wed-date_field\n
Notes:\n $notes\n";
//echo "Data has been submitted to $to!";
header("Location: basarili.php?to=".$to);
mail($to, $subject, $body);
} else {
//echo "blarg!";
header("Location: basarisiz.php?to=".$to);
}
?>