Hi,
sorry about that will put the php in tags from now on.
Yes, i changed the email address to mine and it sends fine.
When I try to replace the $targetmail to $club, it says ‘Email Sent’ but does not come through.
this is how is have done it…
[php]
<?php
$targetemail = '$club';
$name = $_POST['inputFullname'];
$email = $_POST['inputEmail'];
$phone = $_POST['inputPhone'];
$message = $_POST['inputMessage'];
$number = $_POST['inputNumber'];
$club = $_POST['inputClub'];
$date = $_POST['inputDate'];
$num1 = isset($_POST['num1']) ? $_POST['num1'] : "";
$num2 = isset($_POST['num2']) ? $_POST['num2'] : "";
$total = isset($_POST['captcha']) ? $_POST['captcha'] : "";
$captcha_error = captcha_validation($num1, $num2, $total);
if (is_null($captcha_error)) {
$fullmessage = 'Name : ' . $name . '
' .
'Email : ' . $email . '
' .
'Phone : ' . $phone . '
' .
'Message : ' . $message . '
' .
'No of People : ' . $number . '
' .
'Club : ' . $club . '
' .
'Date : ' . $date . '
';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
// More headers
$headers .= 'From: <' . $email . '>' . "\r\n" .
'Reply-To: ' . $email . "\r\n" .
'X-Mailer: PHP/' . phpversion();
//send email
mail($targetemail, "Contact from " .$email, $fullmessage, $headers);
}
function captcha_validation($num1, $num2, $total) {
global $error;
//Captcha check - $num1 + $num = $total
if( intval($num1) + intval($num2) == intval($total) ) {
$error = null;
}
else {
$error = "Captcha value is wrong.";
}
return $error;
}
?>
[/php]
I tried the die($email); but nothing would send.
I have the form setup like you said…
Club 1
Club 2
Thanks for your help.