<?php 

    include('connection.php');
    $val=$_POST['val'];
    $query= "SELECT * FROM user WHERE added_by='sadmin' AND user_type='$val'";
    $res=mysqli_query($conn,$query);
    while($row=mysqli_fetch_array($res)){
        ?>
        <option><?php echo $row['user_id'];?></option>
       <?php

    }


?>