Hi,
This is my first post, so hopefully, you'll go easy on me. I'm a serious PHP newbie..
I have an form that calls a .php file. The php file is supposed to generate an email made up of the captured form fields and redirect the user to a 'thank you' page. The redirect works, but the email is not being generated.
Here is my code:
<?PHP putenv("TZ=US/Central"); $time = date("M j, Y, g:i a");
$name = $_POST["name"];
$email = $_POST["email"];
$phone = $_POST["phone"];
$contact = $_POST["contact"];
$destination = $_POST["destination"];
$resort_brand = $_POST["resort_brand"];
$specific_resort = $_POST["specific_resort"];
$specialty_vacation = $_POST["specialty_vacation"];
$cruise_line = $_POST["cruise_line"];
$cruise_destination = $_POST["cruise_destination"];
$cruise_duration = $_POST["cruise_duration"];
$departDate = $_POST["departDate"];
$number_adults = $_POST["number_adults"];
$number_of_nights = $_POST["number_of_nights"];
$number_children = $_POST["number_children"];
$age1 = $_POST["age1"];
$age2 = $_POST["age2"];
$age3 = $_POST["age3"];
$age4 = $_POST["age4"];
$age5 = $_POST["age5"];
$passport = $_POST["passport"];
$handicapped = $_POST["handicapped"];
$comments = $_POST["comments"];
$recipient = "smarshall@stltoday.com, jmcginnis@post-dispatch.com, info@classictravelstl.com";
$subject = "Classic Travel quote request";
$body = "<p><b>Name:</b> $name<p><b>Email:</b> $email<p><b>Phone:</b> $phone<p><b>Contact:</b> $contact<p><b>Destination:</b> $destination<p><b>Resort Brand:</b> $resort_brand<p><b>Specific Resort:</b> $specific_resort<p><b>Specialty Vacation:</b> $specialty_vacation<p><b>Cruise Line:</b> $cruise_line<p><b>Cruise Destination:</b> $cruise_destination<p><b>Cruise Duration:</b> $cruise_duration<p><b>Departure Date:</b> $departDate<p><b>Number of Adults:</b> $number_adults<p><b>Number of Nights:</b> $number_of_nights<p><b>Number of Children:</b> $number_children<p><b>Age1:</b> $age1<p><b>Age2:</b> $age2<p><b>Age3:</b> $age3<p><b>Age4:</b> $age4<p><b>Age5:</b> $age5<p><b>Passport:</b> $passport<p><b>Handicapped:</b> $handicapped<p><b>Comments:</b> $comments";
$headers = "From: \"$name\" <$email>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "X-Mailer: Drupal\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$send = mail($recipient,$subject,$body,$headers);
header( "Location: http://dmsgroup.co/classic-travel/thank_you.html" ) ;
?>
The form that calls this file is here: http://dmsgroup.co/classic-travel/request_info.html
It was working at one point, but it's not anymore. Also, when it was working, the "specialty_vacation" field (which is a checkbox) would not pull in any data. Do I need to do something different to access checkboxes?
Thanks in advance for your help!
SteveMTNO