<?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))
{
    
         $vehicle = $row['vehicleno'];
         $customerid = $row['customer'];
         $customername=$row['cusname'];
         $vehiclename = $row['vehiclename'];
         $productname = $row['proname'];
         $productcode =  $row['product'];
         $weight = $row['weight'];
         $estqty = $row['estimatedqty'];
         $tripsheet=$row['tripsheetno'];
         $output = $vehicle.'||'.$customerid.'||'.$customername.'||'.$vehiclename.'||'.$productname.'||'.$productcode.'||'.$weight.'||'.$estqty.'||'.$tripsheet;
}
echo $output;
}
else
{
 echo "";
}

?>
