ok i need the script to be done so i intended it myself.
when i press submit, it takes me to mail.php and it just displays the source.
what am i doing wrong?
here is an example:
Untitled.htm **
<form action="mail.php" method="post">
Your Name: <input type="text" name="name"><br>
E-mail: <input type="text" name = "email"><br><br>
Comments<br>
<textarea name="comments"></textarea><br><br>
<input type="submit" value="Submit">
</form>
mail.php **
<?php
$name=$_POST['name'];
$email=$_POST['email'];
$comments=$_POST['comments'];
$to="josh3316@hotmail.com";
$message="$name just filled in your comments form. They said:\n$comments\n\nTheir e-mail address was: $email";
if(mail($to,"Comments From Your Site",$message,"From: $email\n")) {
echo ("Thanks for your comments.");
} else {
echo ("There was a problem sending the mail. Please check that you filled in the form correctly.");
}
?>
anyone know? thx in advanced
-JOSH 
|