<?php
include ('../config.php');
if(!empty($_POST["cityID_proj"])){ 
    $query = "SELECT * FROM porj_locations WHERE cityID_proj = ".$_POST['cityID_proj']." ORDER BY Location ASC"; 
    $result = $connpe->query($query); 
    if($result->num_rows > 0){ 
        echo '<option value="">-Select Location-</option>'; 
        while($rowcat = $result->fetch_assoc()){  
            echo '<option value="'.$rowcat['Location'].'">'.$rowcat['Location'].'</option>'; 
        }
    }else{	echo '<option value="">Location not available</option>';	} 
}