Make a file named form.php
PHP Code:
<?php
If(!$_POST[submit]){//If form isnt submitted
//The form ect goes here make sure you name the submit button submit".
echo("
<form method=\"POST\" action=\"form.php\">
<input type=\"text\" name=\"name\" size=\"19\"><br>
<br>
<input type=\"text\" name=\"email\" size=\"19\"><br>
<br>
<textarea rows=\"9\" name=\"message\" cols=\"30\"></textarea>
<br>
<br>
<input type=\"submit\" value=\"Submit\" name=\"submit\">
</form>
");
}
else{
$message = "The name of the person who sent this is: /n
$_POST[name] /n
their email is: /n
$_POST[email] /n
their message is /n
$_POST[message]
$_POST[message]";
//the form was submitted so we contnue
mail( 'youremail@example.com', 'Email from the contact form', '$message' );
echo("Thank you <a href=\"mailto:$_POST[email]>$_POST[name]</a> your message: <br> $_POST[message] has been emailed to the admin! ");
}
?>
I havent tested this i just wrote it quick in the message box it was just to show you how to do it
Thanx,
Aidan