<?php 
include "../config.php";
error_reporting(0);
$customer = $_POST['cus'];
$product = $_POST['product'];
//echo $customer;
if ($customer != '')
{
$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'];
   
}
if($propricecus == '')
{
    echo $proprice;
}
else
{
    echo $propricecus;
}
}
else
{
 echo "";
}

?>
