Try this simple form. There are a butt load of them available.
1. First you need to create a form to use the PHPmail script. A form will look something like the one below.
It must be saved as an htm or html file. You can edit the one below to suit your own needs.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Contact Us</title>
<link rel="stylesheet" type="text/css" href="../../css/nms.css" />
</head>
<body>
<form method="post" action="mail.php">
<table>
<tr>
<td>What is your name ?</td>
<td><input type="text" name="name" /></td>
</tr>
<tr>
<td>What is your e-mail address ?</td>
<td><input type="text" name="email" /></td>
</tr>
<tr>
<td> Comments:</td>
<td><textarea name="data" cols=40 rows=6></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" /></td>
</tr>
</table>
</form>
</body>
</html>
2. Next you need to create a file named mail.php which will contain the following code.
<?
$to = 'me@mydomain.com';
$subject = 'subject';
$message = 'From: ' . $_REQUEST['name'] . "\n\n" . $_REQUEST['data'];
$email = $_REQUEST['email'];
$headers = 'From: ' . $email . "\r\n" .
'Reply-To: ' . $email . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail ($to, $subject, $message, $headers);
header("Location: thanks.html");
?>
Note: You will replace 'me@mydomain.com' with your e-mail account and 'subject' with what
will be in the subject field of the e-mail. Replace "thanks.html" with the name of the page that the
viewer will be redirected to after submitting the form.
3. Upload both files into your webspace. Make sure to set the correct permission for the PHP file.
Further reading:
PHP Mail
Cheers,
Williwaw