<?
$to = "sanju@mycutelife.net";
$from_header = "From: test";
$contents = "hello";
$subject = "testing";
if($contents != "")
{
//send mail - $subject & $contents come from surfer input
mail($to, $subject, $contents, $from_header);
// redirect back to url visitor came from
header("Location: $HTTP_REFERER");
}
else
{
print("Error, no comments were submitted!");
print("");
}
?>

Sample html script

<?
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;

mail( "yourname@example.com", "Feedback Form Results",
$message, "From: $email" );
header( "Location: http://www.mycutelife.net/thankyou.html" );
?>