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

<?
$username=“username”;
$password=“passw”;
$database=“database”;
$sex=$_POST[‘sex’];
$first=$_POST[‘first’];
$last=$_POST[‘last’];
$dob=$_POST[‘dob’];
$license=$_POST[‘license’];
$address=$_POST[‘address’];
$address2=$_POST[‘address2’];
$city=$_POST[‘city’];
$postcode=$_POST[‘postcode’];
$state=$_POST[‘state’];
$phone=$_POST[‘phone’];
$mobile=$_POST[‘mobile’];
$payment=$_POST[‘payment’];
$price=$_POST[‘price’];
$fax=$_POST[‘fax’];
$email=$_POST[‘email’];
$web=$_POST[‘web’];
$user=$_POST[‘user’];
$pass=$_POST[‘pass’];
mysql_connect(localhost,$username,$password);
@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’)”;
mysql_query($query);
mysql_close();
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

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


the form can be seen here

http://www.koalahosting.com.au/php/form.html

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

I hope you can give some advise

Mogens