<?php 

include 'inc/conx.php';

$invoice = $_POST['invoice'];

$select = $db->query("SELECT * FROM customerinvoice WHERE invoiceNo = '$invoice' ORDER BY id DESC");
while($row  = $select->fetchArray()){
echo '<tr>
			<td>'.$row['item_code'].'</td>
			<td>'.$row['item_name'].'</td>
			<td>'.$row['sell'].'</td>
			<td>'.$row['qty'].'</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();

?>