- Original Poster
- #1
I am currently developing a site and the contact form just wont work...
http://development.thomashardy.me.uk/contact.html
Can anyone shed any light on where I am going wrong?
http://development.thomashardy.me.uk/contact.html
Code:
<?php
if(isset($_POST['submit'])) {
$to = "[email protected]";
$subject = "Contact Form";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
foreach($_POST['check'] as $value) {
$check_msg .= "Checked: $value\n";
}
$body = "From: $name_field\n E-Mail: $email_field\n $check_msg Message: $message\n";
echo "Data has been submitted to $to!";
mail($to, $subject, $body);
} else {
echo "blarg!";
}
?>
