<?php 
require_once('config/config.php');
require_once(CLASS_DIR.'dbClass.php');

$obj1 = new DBClass();
?>

<option value="">--Select State--</option>
<?php
$sql2 = "SELECT DISTINCT(noncoal_state) as noncoal_state FROM ".TBL_LISTING." where origin = '".$_REQUEST['origin']."' and noncoal_state != '' ORDER BY noncoal_state ASC";

$rs2 = $obj1->executeQry($sql2,$link);

while($row2 = $obj1->fetchrow()){
?>
<option value="<?php echo $row2['noncoal_state'];?>" <?php if($_REQUEST['noncoal_state'] == $row2['noncoal_state']) echo 'selected'; ?>><?php echo $row2['noncoal_state'];?></option>
<?php } ?>
