Hello,
any kind chaps out there that can help with this?
instead of displaying the “Data has been submitted to…”
how might i alter the code to launch a thank you page
using “header” and if sending fails make it launch an
error page?
its the code provided in the php tutorial section. i
want to keep it simple cos im certainly no progammer!
thanks
<?php
if(isset($_POST['submit'])) {
$to = "info@conflictingpixels.com";
$subject = "MK Removals Website Contact Form";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$option = $_POST['radio'];
$dropdown = $_POST['drop_down'];
foreach($_POST['check'] as $value) {
$check_msg .= "Checked: $value
";
}
$body = "From: $name_field
E-Mail: $email_field
$check_msg Option: $option
Drop-Down: $dropdown
Message:
$message
";
echo "Data has been submitted to $to!";
mail($to, $subject, $body);
} else {
echo "blarg!";
}
?>