Thanks for the quick reply. It is definately some where in this peice of code.
elseif(!ereg("^[-a-z0-9!#$%&\'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&\'*+/=?^_`{|}~]+)*@(([a-z0-9]([-a-z0-9]*[a-z0-9]+)?){1,63}\.)+([a-z]([-a-z0-9]*[a-z0-9]+)?){2,63}$", $email)) {
print " <h3>Sorry the email address you entered looks like it's invalid.</h3>";
I take that out to this below and it works.
<?php
$to = "admin@texascampingforum.com"; // change to your email address
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$msg = $_POST['msg'];
$d = date('l dS \of F Y h:i:s A');
$sub = "form to mail";
$headers = "From: $name <$email>\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
$mes = "Subject: ".$subject."\n";
$mes .= "Message: ".$msg."\n" ;
$mes .= "Name: ".$name."\n";
$mes .= 'Email: '.$email."\n";
$mes .= 'Date & Time: '.$d;
if (empty($name) || empty($email) || empty($subject) || empty($msg))
{
echo " Sorry all fields are required.";
}
else
{
mail($to, $sub, $mes, $headers);
print " <h3><center>Thank you ".$name." for contacting us.<br>We will get back to you as soon as posiable</center></h3>";
}
?>
Sp atleast I am on the right track to know where my problem is at. Just don't know why it's a problem.
-Thanks