Well first off you will need to know the fields you want emailed, I usualyy use the $HTTP_POST_VARS array to get the fields into the email. The mail function takes three and optionally four parameters. The first os the to address, the 2nd is the subject, the 3rd is the body, you can optionally pass a from and CC variable wit the 4th.
For instance
$to = "someone@somewhere.com";
$subj = "form submission";
$from = "From: me@mydomain.com";
to set u pthe body I usually loop through the array mentioned above and add to a variable called $body like:
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$body .= $key ." = ". $val ."\n";
}
if you had two fields in your form named name and email then the body of your email would like
name = Someguy
email = someguy@somewhere.com
Now you can enter the fields values into your db like
$result = mysql_query("INSERT into table (name, email) VALUES ('$name', '$email')");
This cann all be done in one script.