contact.php
[CODE]<form action=”contact2.php” method=”post”>
Name: <input type=”text” name=”name”><BR>
Email: <input type=”text” name=”email”><BR>
Comments:<BR>
<textarea name=”comments”></textarea><BR>
<input type=”submit” value=”Submit”>
</form>
contact2.php
[CODE]<?php
$name=$_POST[‘name’];
$email=$_POST[’email’];
$comments=$_POST[‘comments’];
$to=”[email protected]”;
$message=” Name: $name n Email: $email n Comments: $comments n IP: $REMOTE_ADDR”;
if(mail($to,”Comments From Your Site”,$message,”From: $emailn”)) {
echo “”;
} else {
echo “There was a problem sending the mail. Please check that you filled in the form correctly.”;
}
?>
Anyone any idea why when you fill in the form and submit and it goes to the next page the email doesn’t seem to reach my inbox?