I have uploaded a simple formmail.php on my site.
Code: Select all
<?php
// your email address
$youremail = "admin@bicestertown.co.uk";
// 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-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3})?)$', $email)) {
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.");
}
?>1) http://www.bicestertown.co.uk/2-INDEX/contact.htm
2) http://www.bicestertown.co.uk/advertise ... scribe.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?
feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]