I am really not sure what I am doing wrong here (I removed the actual email addresses as this is for a client). Everything is fine in Firefox - form submits, gets received, etc. In IE, it either submits, but doesn’t get received in email or gives the “Message Delivery Failed” message that I set as default when something goes wrong.
Thanks for any help you can provide!
<?php
if(isset($_POST['submit'])) {
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$zipcode = $_POST['zipcode'];
$other = $_POST['other'];
if(is_array($_POST['available']))
{
foreach($_POST['available'] as $value) {
$check_avail .= "
-$value
";
}
}
if(is_array($_POST['volunteer']))
{
foreach($_POST['volunteer'] as $value) {
$check_vol .= "
-$value
";
}
}
$to = "email@website.com";
$subject = "Volunteer Form from"." ".$firstname." ".$lastname;
$body = " ".$firstname." ".$lastname." wrote:
“;
$body .= " I am interested in volunteering for:”.$check_vol." “.$other.”
“;
$body .= " I am available during the:”.$check_avail."
“;
$body .= “Contact info for”.” “.$firstname.” “.$lastname.”:
“;
$body .= " Phone Number:”." “.$phone.”
";
$body .= " “.$email.”
";
$body .= " “.$address.” “.$city.” “.$state.” ".$zipcode;
$header = "From: [EMAIL="email@website.com"]email@website.com[/EMAIL]
";
$header .= "Reply-To: email@website.com
";
}
if (mail($to, $subject, $body, $header)) {
echo("<h3>Thank you! Your message has been sent.</h3>");
} else {
echo("<h3>Oh no! Message delivery failed...Please try again.</h3>");
}
?>