<?php 
include("../db_connection.php");

$sname=$_POST['sname'];




$sqllocation=mysql_query("select * from tbl_cities where cityname like '%$sname%' and status='Enable' order by cityname asc");

if(mysql_num_rows($sqllocation)>0)
{

while($reslocation=mysql_fetch_assoc($sqllocation))
{

?>
   <div class="autocomplete-suggestion cityChoose" data-index="1" id="<?php echo $reslocation['city_id'];?>" value="<?php echo $reslocation['cityname'];?>">
<i class="fa fa-map-marker" aria-hidden="true" style="float: left;"></i>
<strong><?php echo $reslocation['cityname'][0];?></strong><?php echo substr($reslocation['cityname'], 1); ?></div>
  
<?php 
}
}
else
{
	echo"No Record";
}
 ?>
 <script>
 $(".cityChoose").click(function(){

  $(".citys").val($(this).attr('value'));
  
  $("#cityid").val($(this).attr('id'));
  $(".autocomplete-suggestions").css('display','none');

 

 });
 </script>
 