<?
if(isset($_GET['country'])){
$html = '<select name="B" class="input_text" id="B">';
include 'config/config.php';
$dpttitle = mysql_real_escape_string($_GET['country']);
$sql="SELECT * FROM department WHERE DeptCode=$dpttitle";
$result=mysql_query($sql);$options="";
while ($row=mysql_fetch_array($result)){
$did=$row["DeptCode"];
$depts=$row["Dept"];
$html .="<OPTION value='$did'>".$depts;}?>
$html .= '<option value="0">Select...</option>';
$html .= '</option>';
$html .= '</select>';
echo $html;
}
?>