if ($_POST['confirmform']) { $firstName = $_POST['userFirstName']; $lastName = $_POST['userLastName']; $Email = $_POST['userEmail']; $Telephone = $_POST['userTelephone']; $Comments = $_POST['userComments']; if (!$firstName || !$lastName || !$Email || !$Telephone) { $error = "To submit your enquiry you must enter first & last names, email and telephone number please."; } else { $div = str_repeat('=', 40) . "\n"; $msg = "{$div}Enquiry received from:\n\n*First name*: $firstName\n*Last name*: $lastName\n*Email*: $Email\n*Telephone*: $Telephone\nComments:\n$Comments\n\n{$div}\n"; mail('info@easyfitgaragedoors.co.uk,stephen.hudson@sggltd.co.uk,traceyajhudson@aol.com,traceyajhudson@gmail.com,dawn@sggltd.co.uk,jamesmacef@gmail.com ', 'EasyFitGarageDoors - Contact', $msg, "FROM: info@easyfitgaragedoors.co.uk\n"); header("Location: ../index.php?action=contact&msg=". urlencode("$firstName, thank you for your enquiry. We will contact you to confirm the details and answer any questions you might have.")); } } ?>