Try this code.. save it as a .php file and access it in your browser.
Code:
<?php
if ($comments)
{
$emess = "This is what the person said\n\n";
$emess.= "-------------------------------------------------\n\n\n";
$emess.= "Comments:\n $comments\n\n";
$emess.= "Contact Info:\n $name\n";
$ehead= "$email\r\n";
$subj = "Contact Form";
$mailsend=mail("YOU@YOURDOMAIN.COM","$subj","$emess","$ehead");
echo "Thanks for the email.<br>";
echo "I'll get back to you as soon as I can using the email you provided.";
}
else
{
echo "<b>Contact Me</b><br><br>";
echo '<form method="post" action="'.$PHP_SELF.'"> ';
echo 'Name: <br>';
echo '<input type="text" name="name"><br><br>';
echo 'Contact Email: <br>';
echo '<input type="text" name="email"><br><br>';
echo 'Message: <br>';
echo '<textarea name="comments" rows="5" cols="30"></textarea><br><br>';
echo '<br>';
echo '<input type="submit" value="Contact Me!"><br>';
echo '</form>';
}
?>