<?php require_once('../auth/auth.php');?>
<?php
if (isset($_POST['iddd'])) {
    $iddd=     $_POST['iddd'];
    $c_name=   $_POST['c_name'];
    $c_value=  $_POST['c_value'];

mysqli_query($conn,"UPDATE order_list_edit LEFT JOIN pro_unit ON (order_list_edit.pro_unit=pro_unit.puid) SET $c_name = $c_value,unit_val=unit_convart,t_amount=(amount*qty*unit_convart),net_amount=(t_amount-dis_amount),profit=(net_amount-(avg_price*qty*unit_convart)) WHERE order_list_edit.coid='$coid' AND eoid = '$iddd'")or die(mysqli_error($conn));
}
?>