      <?
      echo "<option value='' selected>--Select Division--</option>";
      $mydivquery="Select * from staff_divisions order by div_name"; 
      $mydivresult =& $db->query($mydivquery);
      $mydivcount=$mydivresult->numRows();
      if ($mydivcount!=0) {
        while($mydivrow=$mydivresult->fetchRow()) {
          echo "<option value='".$mydivrow['div_pkey']."' ";
          if ($mydivrow['div_pkey']==$objdivpkey) { echo "selected"; }
          echo ">";
          echo $mydivrow['div_name'];
          echo "</option>";
        }
      }
      ?>
