I have done something similiar with my feedback form, you may be able to get an idea from it by my example, here is the code I created for it;
<?php
if (!isset($submit)) {
echo("
<html>
<head>
<title>Barnsley Club - Feedback</title>
<link href='images/style.css' rel='stylesheet' type='text/css'>
</head>
<body>
<center>
<table class='table' align='center' width='485' border='0' cellpadding='20' cellspacing='0'>
<tr><td>
<div align='justify'>
<center><font class='header'>Barnsley Club Feedback</font></center><br>
Welcome, we need your help to make this site one to remember! If you have any suggestions, comments or feedback, fill in the feedback form below to tell us what you think about the site!
</div>
<br><br>
<table align='center' width='80%' cellpadding='0' cellspacing='0' border='0'>
<tr><td>
<form method='post'>
Name: <input class='textbox' type='text' name='name' size='53'><br><br>
E-Mail: <input class='textbox' type='text' name='email' size='53'><br><br>
Feedback: <br> <textarea class='textarea' name='message' rows='12' cols='64'></textarea><br><br>
<input class='textarea' type='submit' value='Send' name='submit'> <input class='button' type='reset' value='Clear'>
</form>
</td></tr>
</table>
</td></tr>
</table>
</center>
</body>
</html>
");
}
else if ($submit == true) {
$bclubmsg ="Thank You $name for your recent feedback at www.barnsleyclub.co.uk! You sent us this information; \n\n :: $message :: \n\n We will respond with comments on your ideas very soon! Thank You!";
mail( "mwood_2k2@msn.com", "Feedback from $name", $message, "From: $email" );
mail("$email", "Confirmation from Barnsley Club Feedback", $bclubmsg, "From: office@barnsleyclub.co.uk" );
echo("
<html>
<head>
<title>Barnsley Club - Thank You!</title>
<link href='images/style.css' rel='stylesheet' type='text/css'>
</head>
<body>
<br><br><br><br><br><br>
<center>
<table class='table' width='65%' border='0' cellpadding='10' cellspacing='0'>
<tr><td>
<div align='center'>
Thank you $name for your comments!
<br><br>
You will receive an confirmation e-mail shortly!
</div>
</td></tr>
</table>
<br><br>
<a href='index.php'>[ Click here to return to the Homepage ]</a>
</center>
</body>
</html>
");
}
?>
It might seem a bit complicated but you'll see what I've done with the variables from the user inputted information, pay attention to the 2nd mail function.
I haven't upgraded this to html e-mail yet, I know how to do it, it's just getting round to it <G>