Well I hope it's okay if I ask a question about php on here, I'm not really sure, but this seemed like the place to go. So I've been having a ton of trouble with my script and I can't figure out why because I am not super familiar with php... but here's my story. I am supposed to build a website for the family business and they want it to have a mail.php in it. I said okie dokie and got to work. We use yahoo as our webhost, and their servers are running on php 4.1.3. I got a free template for the website off the internet, which came with a mail.php and edited to what I thought it was supposed to be, however, the mail isn't working. I'm not sure what version the script is written in, so it may be that the script and yahoo's servers are not compatible, or maybe I just did it all wrong, I'm not sure... but here's the script:
<?
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$message=$_POST['message'];
$ToEmail = "
[email protected]";
$ToSubject = "Contact Form from The Website";
$EmailBody = "Name: $name\n
Email: $email\n
Phone: $phone\n
Message: $message\n";
$Message = $EmailBody;
$headers .= "Content-type: text; charset=iso-8859-1\r\n";
$headers .= "From:".$email."\r\n";
mail($ToEmail,$ToSubject,$Message, $headers);
?>
Can anyone tell me what I've done wrong or what version of php this is written in?
Thanks for your time regardless and I hope you have a good day!