<?php 
    require_once ("../var/res.php");
    
    if(isset($_GET['typeid'])){
        $a=$_GET['typeid'];
        $sql= "SELECT * FROM tbl_items WHERE itype='".$a."' ";
        $stmt = $conn->query($sql);
        $num = $stmt->rowCount();
        if($num>0){?>
        <option></option>
        <?php
    	while ($row = $stmt->fetch()) { 
    	?>
        <option value="<?php echo $row['item_id'];?>"><?php echo $row['item_name'];?></option>
       <?php 
    	}  
    }
 }
 
 ?>	