Hi there,
I'm having trouble getting php correct for a flash based email form. I have the form working (i.e. the email will send when I click submit) but it only recognised one field on the email form because I had each field named &message. When I changed these names, the form would no longer send when the submit button was clicked.
This is the code on the button in flash:
on (release) {
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("email.php", "POST");
}
And this is the current php I tried (but it won't send.)
<?php
$sendTo = "myemail@yahoo.co.uk";
$subject = "Golf Course Booking Form";
$headers = "From: " . $POST["leadName"];
$headers .= "<" . $POST["fromEmail"] . ">\r\n";
$headers .= "Reply-To: " . $POST["FromEmail"] . "\r\n";
$headers .= "Return-Path: " . $POST["fromEmail"];
$package = $POST["whichPackage"];
$noofpeople = $POST["howManyPeople"];
$nongolfers = $POST["anyNonGolfers"];
$carhire = $POST["carHire"];
$transfer = $POST["transferTransport"];
$golfbuggies = $POST["golfBuggies"];
$totalpackage = $POST["totalPackage"];
$golfcourses = $POST["golfCoursesOnly"];
$specialreq = $POST["specialRequirements"];
$email = $POST["fromEmail"];
$phone = $POST["fromNumber"];
$name = $POST["leadName"];
$address = $POST["leadAddress"];
$noinparty = $POST["numberInParty"];
$names = $POST["partyNames"];
$arrivaldate = $POST["arrivalDate"];
$arrairportuk = $POST["arrivalAirportUk"];
$arrairportire = $POST["arrivalAirportIreland"];
$deptdate = $POST["departureDate"];
$deptairportire = $POST["departureAirportIreland"];
$deptairportuk = $POST["departureAirportUk"];
$message = $POST["comments"];
mail($sendTo, $subject, $package, $noofpeople, $nongolfers, $carhire, $transfer, $golfbuggies, $totalpackage, $golfcourses, $specialreq, $email, $phone, $name, $address, $noinparty, $names, $arrivaldate, $arrairportuk, $arrairportire, $deptdate, $deptairportire, $deptairportuk, $message, $headers);
?>
Any help greatly appreciated.