<?php 
include("../db_connection.php");
$ads_id="ads_id!=''";
$sname=$_POST['sname'];

$sql=mysql_query("select * from tbl_ads where title like '%$sname%' and admin_status='Approved'");
if(mysql_num_rows($sql)>0)
{
while($res=mysql_fetch_assoc($sql))
{
	$ads_id=$res['ads_id'];
	
	$title=$res['title'];
	
	?>
		  <div class="autocomplete-suggestion AdsChoose" data-index="1"  value="<?php echo $title;?>"><strong><?php echo strtoupper($title[0]);?></strong><?php echo substr($title, 1); ?></div>
	<?php
	
}

}
?>

<script>
$(".AdsChoose").click(function(){

$("#search_ads1").val($(this).attr('value'));


 
 
 
 if(typeof ($(this).attr('id')) != 'undefined')
 {
	  
	  $("#Mcid").val($(this).attr('id'));
	 
 }
 $("#productsearch1").css('display','none');
 

 
});
</script>