      <?
      echo "<option value='' selected>--Select Subcontractor--</option>";
      $mysubquery="Select * from settings_subcontractors order by subconname"; 
      $mysubresult =& $db->query($mysubquery);
      $mysubcount=$mysubresult->numRows();
      if ($mysubcount!=0) {
        while($mysubrow=$mysubresult->fetchRow()) {
          echo "<option value='".$mysubrow['subconmasterpkey']."' ";
          if ($mysubrow['subconmasterpkey']==$objsubconpkey) { echo "selected"; }
          echo ">";
          echo $mysubrow['subconname'];
          echo "</option>";
        }
      }
      ?>
