how to stop receiving duplicate mail?
<p>When a user press submit button I received 7 copies duplicate mail in my administrator email box. How can I receive only one mail. here is my code.</p>

<pre><code>$MyCoupon = 0;
$cResult=mysql_query("select * from codes WHERE status='active'");
while($cRow = mysql_fetch_assoc($cResult)){
    if($_POST['coupon_used']==$cRow['code'] || $_POST['invoice']=="invoice"){

            $coupon = ($_POST['coupon_used']!="" ? $_POST['coupon_used'] : "invoice");

            $aRes = mysql_query("SELECT * FROM `adverts` WHERE `ad_id`='".$_POST['ad_id']."'");
            $aRow = mysql_fetch_assoc($aRes);

            $updateQuery = "UPDATE `adverts` SET `message_status`='awaiting approval',`target_impressions`='".$_POST['ad_impressions']."',`recurring`='".$_POST['ad_recurring']."',`coupon_used`='".$coupon."',`POIO`='".$_POST['ad_POIO']."' WHERE `ad_id`='".$_POST['ad_id']."'";         
            $updateResult=mysql_query($updateQuery) or die("Unexpected error: record could not be added.".mysql_error());
            include_once("update_ads_from_database.php");

            //SEND EMAIL to CC
                $to = "mymail@gmail.com";
            $headers = 'MIME-Version: 1.0' . "\r\n";
            $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
            $headers .= 'From: Do-Not-Reply@domain.com';
            $subject = 'New self-serve mail';
            $message = "The following self-service ad has just been submitted:&lt;br&gt;";
            $message .= $aRow['contact_name']."&lt;br&gt;".$aRow['contact_phone']."&lt;br&gt;".$aRow['contact_email'];
            $message .= "&lt;br&gt;&lt;br&gt;Description:".$aRow['description']."&lt;br&gt;Content:".stripslashes($aRow['value'])."&lt;br&gt;&lt;br&gt;";
            $message .= "Click &lt;a href=\"http://www.domain.com/admin/approve_self_ad.php\"&gt;here&lt;/a&gt; to approve it.";
            mail($to,$subject,$message,$headers);
            $goodCoupon++;
</code></pre>
