<?php $PageSecurity = 11;
include('includes/session.inc');
include('includes/header.inc');
include('includes/SQL_CommonFunctions.inc');

   $state = $_GET['state'];
  $country = $_GET['country'];
 
 if($state!='' && $country!='') {
	  $site_state =  $state;
	  $site_country = $country ;
	  ?>
	  <div id="searchcity">
	  <select name="city" id="city" >
       <option value="">---Select City---</option>
	   <?php 
	   $sql = "select * from city_master where country='".$site_country."' and state='".$site_state."'";
	   $result = DB_query($sql,$db);
	   while($city_row = DB_fetch_array($result))
	   {
	   		$p='';
			if($city_row['id'] == $row['pre_city'])
			$p="selected";
	   ?>
	  <option value="<?php echo $city_row['id']; ?>" <?php echo ($row['pre_city']==$city_row['id']?"selected":"") ?>><?php echo $city_row['city']; ?></option>
	   <?php }?>
      </select></div>
<?php } ?>