      <?
      echo "<option value='' selected>--Select Information Category--</option>";
      if ($pubuserrole>=2) {
        $mycategoryquery="Select * from class_categories order by category_name"; 
      } else {
        $mycategoryquery="Select * from class_categories where category_grouppkey='".$pubusergrouppkey."' order by category_name"; 
      }

      $mycategoryresult =& $db->query($mycategoryquery);
      $mycategorycount=$mycategoryresult->numRows();
      if ($mycategorycount!=0) {
        while($mycategoryrow=$mycategoryresult->fetchRow()) {
          echo "<option value='".$mycategoryrow['category_pkey']."' ";
          if ($mycategoryrow['category_pkey']==$mycategorypkey) { echo "selected"; }
          echo ">";
          echo $mycategoryrow['category_name'];
          echo "</option>";
        }
      }
      ?>
