<?php include("connect.php"); ?>
<?php
if(isset($_POST['category_id'])) {
	$sql = "select * from `tbl_master_product` where `product_id`=".mysqli_real_escape_string($con, $_POST['category_id']);
	$res = mysqli_query($con, $sql);
	if(mysqli_num_rows($res) > 0) {
		echo "<option value=''>------- Select --------</option>";
		while($row = mysqli_fetch_object($res)) {
			echo "<option value='".$row->product_id."'>".$row->product_name."</option>";
		}
	}
} else {
	header('location: ./');
}
?>
