<?php 

include 'inc/conx.php';

$invoice = $_POST['invoice'];

$select = $db->query("SELECT * FROM expiries WHERE invoiceNo = '$invoice' ORDER BY id DESC");
while($row  = $select->fetchArray()){
//<td style="vertical-align: top; text-align: center;"><button type="button" class="btn btn-danger deleteItem" value="'.$row['id'].'">Delete</button></td>
echo '<tr>
			<td>'.$row['item_code'].'</td>
			<td>'.$row['item_name'].'</td>
			<td style="display: none">'.$row['unit'].'</td>
			<td>'.$row['sell'].'</td>
			<td>'.$row['qty'].'</td>
			<td style="display: none">'.$row['discount_pr'].'</td>
			<td>'.$row['discount_rs'].'</td>
			<td>'.$row['total'].'</td>
			<td style="vertical-align: top; text-align: center;"><button type="button" class="btn btn-danger deleteItem" value="'.$row['id'].'">Delete</button></td>
			
		  </tr>';
		}
die();

?>