<?php 
include "../config.php";
$ticket = $_POST['ticket'];
//echo $customer;
if ($ticket != '')
{
$sql = "select *,(select customerdetails.name from customerdetails where customerdetails.code = ticket.customer )as cusname,(select productdetail.productname from productdetail where productdetail.productcode = ticket.product )as proname from ticket where ticket = '$ticket' && status !='deleted'";
//echo $sql;
$conn=mysqli_query($connect,$sql);
while($row=mysqli_fetch_array($conn))
{
       $product = $row['product'];
       $customer = $row['customer'];
       //$output.='<option value='.$row['product'].'>'.$row['proname'].'</option>';
       // $cus=mysqli_query($connect,"select * from customerrate where status !='deleted' && productcode !='$product' && customer = '$customer'");
       // while($cusshow = mysqli_fetch_array($cus))
       // {
       
       //        $output.='<option value='.$cusshow['productcode'].'>'.$cusshow['productname'].'</option>
       // ';
       // }
       $output = $row['proname'];
         
}
echo $output;
}
else
{
 echo "";
}

?>
