Hi everybody
<?php
// your email address
$youremail = “
// field validation
if ($email==”” || $comments==”” || $name==””)
{
print (“All fields are required! Please go back and try again.”);
}
else {
// email validation
if(!eregi(‘^([._a-z0-9-]+[.*)@(([a-z0-9-]+..
print (“Your email address does not appear to be valid. Please go back and try again.”);
exit;
}
// send email
$headers = “From: “$name” <$email>n”;
$subject = “Feedback Form”;
$message = “$comments”;
mail (“$youremail”, “$subject”, $message, $headers);
print (“Thank you $name, your email has been sent to Bicester Town.”);
}
I have a 2 contact forms in 2 of my pages:
1) [url]http://www.bicestertown.co.uk/2-INDEX/contact.htm
2) [url]http://www.bicestertown.co.uk/advertise-rating-subscribe/subscribe.htm
Both forms use the same php file (formmail.php)
The problem here is that form number 1) doesn’t send emails. I get the confirmation page but it doesn’t send any emails. Also, it opens the confirmation page in its own window. (a new window) The code is the same as I am using the same code for both. Why one of them sends emails and the other one doesn’t?