Code:
<form action="<?=$PHP_SELF?>" method="post">
Your Email: <input type="text" name="email" size="20" /><br />
Subject: <input type="text" name="subject" size="20" /><br />
Message: <textarea rows=5 cols=30 name="message"></textarea><br />
<input type="submit" name="submit" value="Contact Me!" />
<?
if(isset($_POST['submit']))
{
$email = $_POST['email'];
$to = "your@email.com";
$subject = $_POST['subject'];
$message = str_replace(array("\\","Content-Type:","bcc:","cc:","MIME-Version:",
"Content-Transfer-Encoding:","%"),"",$_POST['message']);
mail($to, $subject, $message, "From: $email\n");
echo "Thanks";
}
?>
Always recycle kids!
Use the above to get an email of the form data. Save it as whatever.php and change
your@email.com to your email. Hope it helps you.