I have a contact form and when I click send only some of the information is sent to me and the rest of the fields are blank? Anyone have any idea as to why this is happening?
Here is my PHP code I have...and I've labelled what is not being sent. Also, my html code is split over 2 columns and it seems as though none of the data in the first column is being sent, only the second...could this be the case? Or have I just ballsed up the php code below? Or both? lol
<?PHP
if(isset($_POST['submit'])) {
$to = "";
$subject = "Quote Request";
$name_field = $_POST['name']; NOT SENDING
$house_field = $_POST['house']; NOT SENDING
$street_field = $_POST['street']; NOT SENDING
$town_field = $_POST['town']; NOT SENDING
$city_field = $_POST['city']; NOT SENDING
$postcode_field = $_POST['postcode']; NOT SENDING
$phone_field = $_POST['phone']; NOT SENDING
$email_field = $_POST['email']; NOT SENDING
$event_field = $_POST['event']; NOT SENDING
$other_field = $_POST['other']; NOT SENDING
$passengers_field = $_POST['passengers']; NOT SENDING
$vehicle_field = $_POST['vehicle']; NOT SENDING
$day_field = $_POST['day']; NOT SENDING
$month_field = $_POST['month']; NOT SENDING
$year_field = $_POST['year']; NOT SENDING
$house1_field = $_POST['house1'];
$street1_field = $_POST['street1'];
$town1_field = $_POST['town1'];
$city1_field = $_POST['city1'];
$postcode1_field = $_POST['postcode1'];
$hour_field = $_POST['hour'];
$min_field = $_POST['min'];
$house2_field = $_POST['house2'];
$street2_field = $_POST['street2'];
$town2_field = $_POST['town2'];
$city2_field = $_POST['city2'];
$postcode2_field = $_POST['postcode2'];
$returnrequired_field = $_POST['returnrequired'];
$returnhour_field = $_POST['returnhour'];
$returnmin_field = $_POST['returnmin'];
$message_field = $_POST['message'];
$feedback_field = $_POST['feedback'];
$body = "From: $name_field\n Address Line 1: $house_field\n Address Line 2: $street_field\n Town: $town_field\n City: $city_field\n Postcode: $postcode_field\n Phone: $phone_field\n Email: $email_field\n\n Reason For Hire: $event_field\n Other Event: $other_field\n No of Passengers: $passengers_field\n Type of Vehicle Required: $vehicle_field\n Date Required: $day_field $month_field $year_field\n First Pick Up Address: $house1_field\n $street1_field\n $town1_field\n $city1_field\n $postcode1_field\n First Pick Up Time: $hour_field $min_field\n Final Destination Address: $house2_field\n $street2_field\n $town2_field\n $city2_field\n $postcode2_field\n Return Pick Up Required: $returnrequired_field\n Return Pick Up Time: $returnhour_field $returnmin_field\n Extra Info/Special Arrangements: $message_field\n\n Where Did You Hear About us: $feedback_field\n";
echo "Data has been submitted to $to! Thank you, we will be in touch very soon";
mail($to, $subject, $body);
} else {
echo "blarg!";
}
?>Many thanks
James
This post has been edited by Renaissance-Design: 24 January 2012 - 04:23 PM
Reason for edit: Please use the code button or tags to format your code.
Help















