<?
session_start();
$grp = $_REQUEST['grp'];
include("opendb.php");
$result=mysqli_query($db,"select subname from subgroupmaster where gname='$grp'")or die(mysqli_error($db));
?>
Item Sub Group:
<select name='subgrp' id='subgrp'>
<option value='All'>All</option>
    <?

    while($row=mysqli_fetch_array($result))
    {
     print "<option>$row[0]</option>";
    }
    ?>
</select>
