<?php 

include "top.php";




$q=mysqli_query($con,"SELECT * FROM adduser");
while($arrq=mysqli_fetch_array($q)){
    $packprice=0;

        $getc=mysqli_query($con,"SELECT * FROM tbl_change_package_details WHERE customer_id='$arrq[id]'");
        while($arrchp=mysqli_fetch_array($getc)){

        $packid=$arrchp['pac_id'];
        $getpack=f(q("SELECT * FROM tbl_pack WHERE pid='$packid'"));
        $packprice=floatval($packprice)+$getpack['prc'];


       


        }
        

        $updt=mysqli_query($con,"UPDATE adduser SET price='$packprice' WHERE id='$arrq[id]'");


}


?>