<?php 

include 'inc/conx.php';

$kit_code = $_POST['kit_code'];
$name = $_POST['kit_name'];
$unit = $_POST['unit'];
$cost = $_POST['kit_cost'];
$price = $_POST['kit_price'];
$item_name = $_POST['item_name'];
$qty = $_POST['item_qty'];

$insert = $db->query("INSERT INTO kitsetup (kit_code, kit_name, unit, cost_price, selling_price, kit_items, kit_qty) VALUES ('$kit_code', '$name', '$unit', '$cost', '$price', '$item_name', '$qty')");

$select = $db->query("SELECT * FROM kitsetup ORDER BY id DESC LIMIT 1");
$row  = $select->fetchArray();

echo '<tr>
			<td>'.$row['kit_items'].'</td>
			<td>'.$row['kit_qty'].'</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();

?>