      <?
      echo "<option value='' selected>[None Selected]</option>";
      $mygroupquery="Select * from student_groups where groupgroupsettingspkey='".$mygroupsettings."' order by groupname";
      $mygroupresult =& $db->query($mygroupquery);
      $mygroupcount=$mygroupresult->numRows();
      if ($mygroupcount!=0) {
        while($mygrouprow=$mygroupresult->fetchRow()) {
          echo "<option value='".$mygrouprow['grouppkey']."' ";
          if ($mygrouprow['grouppkey']==$mygroup) { echo "selected"; }
          echo ">";
          echo $mygrouprow['groupname'];
          echo "</option>";
        }
      }
      ?>
