echo "<option value='{$rowPC['0']}'>{$rowPC['1']}</option>\n";
            $rowPC = NULL;
        }
    }
    $num_rows = 0;
    $rsPC = NULL;
}
?>
      </select></td>
    </tr>
    <tr>
      <td align="left"><span class="error">*</span>Assembly</td>
      <td align="left" id="assembly_result"><select name="assembly" id="assembly" style="width:200px;" onchange="return assembly_change();">
      <?php 
if (isset($_REQUEST['assembly']) && isset($_REQUEST['noofparty']) && isset($_REQUEST['poststat'])) {
    $rsAssembly = fatch_assembly_ag_pc($pc_ed, $subdiv_ed);
    $num_rows = rowCount($rsAssembly);
    if ($num_rows > 0) {
        echo "<option value='0'>-Select Assembly-</option>\n";
        for ($i = 1; $i <= $num_rows; $i++) {
            $rowAssembly = getRows($rsAssembly);
            echo "<option value='{$rowAssembly['0']}'>{$rowAssembly['1']}</option>\n";
            $rowAssembly = NULL;
        }
    }
    $num_rows = 0;
    $rsAssembly = NULL;
}
?>
      </select></td>
    </tr>
            $rowPC = getRows($rsPC);
            echo "<option value='{$rowPC['0']}'>{$rowPC['1']}</option>\n";
            $rowPC = NULL;
        }
        echo "</select>";
    } else {
        echo "<select name='pc' id='pc' style='width:200px;'></select>";
    }
    $num_rows = 0;
    $rsPC = NULL;
    unset($rsPC, $rowPC, $num_rows);
}
if ($opn == 'assembly') {
    $sub_div = $_GET["sub_div"];
    $pc = $_GET["pc"];
    $rsAssembly = fatch_assembly_ag_pc($pc, $sub_div);
    $num_rows = rowCount($rsAssembly);
    if ($num_rows > 0) {
        echo "<select name='assembly' id='assembly' style='width:200px;'>\n";
        echo "<option value='0'>-Select Assembly-</option>\n";
        for ($i = 1; $i <= $num_rows; $i++) {
            $rowAssembly = getRows($rsAssembly);
            echo "<option value='{$rowAssembly['0']}'>{$rowAssembly['1']}</option>\n";
            $rowAssembly = NULL;
        }
        echo "</select>";
    } else {
        echo "<select name='assembly' id='assembly' style='width:200px;'></select>";
    }
    $num_rows = 0;
    $rsAssembly = NULL;