<?php

include('db_coni.php');

$type_id = $_POST['type_id'];

$output = '';



$query = "SELECT * FROM items WHERE type_id= '".$type_id."'";

$result = mysqli_query($connecti, $query);

$output = '<option value="">Select Item</option>';

while($row = mysqli_fetch_array($result))

{

 $output .= '<option value="'.$row["item_name"].'">Stock: '.$row["stock"].' [Cost: '.$row["item_cost"].']</option>';

}


	echo $output;


?>

