PHP Problem combining 2 scripts

Hello there

I am new to this forum, and PHP but I am helping a friend creating a form where the data is being inserted into a MySQl database. That part works fine, but how do I get the result of the form mailed to an email address as well.

I use following code for the insert

@mysql_select_db($database) or die( “Unable to select database”);
$query = “INSERT INTO contacts VALUES (’’,’$sex’,’$first’,’$last’,’$dob’,’$license’,’$address’,’$address2’,’$city’,’$postcode’,’$state’,’$phone’,’$mobile’,’$fax’,’$payment’,’$price’,’$email’,’$web’,’$user’,’$pass’)”;
echo “<b><center>Contact Information</center></b><br><br>”;
echo “<b>$sex $first $last</b><br>Date of birth: $dob<br>Drivers license No: $license<br>Address: $address<br>Address 2: $address2<br>City: $city<br>Post Code: $postcode<br>State: $state<br>Phone: $phone<br>Mobile: $mobile<br>Fax: $fax<br>Payment Method: $payment<br>Selected Plan: $price<br>E-mail: $email<br>Web: $web<br>Prefered Username: $user<br>Prefered Password: $pass<br><br><hr><br>”;

and call it from the following in the actual form

<form action=“insert.php” method=“post”>

the form can be seen here

I downloaded the mailer.php but I am not sure how to combine the 2

I hope you can give some advise