<?php
include('dbcon.php');
if($_POST['id'])
{
$id=$_POST['id'];
$v="select b.id,b.name from machine_list b where product_id='$id'";
$sql=mysqli_query($con,$v);


while($row=mysqli_fetch_array($sql))
{
$id=$row['id'];
$data=$row['name'];
echo '<option value="'.$id.'">'.$data.'</option>';
}
}
?>


