<?php 
include "../config.php";
error_reporting(0);
$customer = $_POST['customer'];
$product = $_POST['product'];
//echo $customer;
if (!empty($customer)&& !empty($product))
{
$sql = "select productdetail.productcode,productdetail.price from productdetail where productdetail.productcode = '$product' && productdetail.status !='deleted'";
//echo $sql;
$conn=mysqli_query($connect,$sql);
while($row=mysqli_fetch_array($conn))
{
    
         $proprice = $row['price'];
   
}
$cuspro = "SELECT customerrate.price,customerrate.productname from customerrate where customerrate.customer = '$customer' && customerrate.productcode = '$product' && status !='deleted'";
$connn=mysqli_query($connect,$cuspro);
while($roww=mysqli_fetch_array($connn))
{
    
         $propricecus = $roww['price'];
   
}
echo empty($propricecus)?$proprice:$propricecus;
}
else
{
 echo "";
}

?>
