<?php 
include './connection.php';
$opt = $_REQUEST["val"];
$q1="SELECT * FROM casesnature WHERE ntype='".$opt."'";
    $result=$conn->query($q1);
    if (!empty($result) && $result->num_rows > 0)
     {

			while( $row=$result->fetch_assoc())
			{
   echo '<option value="';echo $row["casetype"];
   echo '">';
   echo $row["casetype"];
   echo '</option>'; 
			}
     }

       ?> 