<?php
include("../db.php");
error_reporting(0);
$q = strtolower($_GET["q"]);
if (!$q) return;
 $sql = "select distinct cust_name as cust_name FROM sample_jobcard_main where cust_name LIKE '%$q%' order by cust_name ASC ";
$rsd = mysql_query($sql);
$count = mysql_num_rows($rsd);
if($count != "0")
{   
    while($rs = mysql_fetch_array($rsd)) 
	{
	$cust_name = $rs['cust_name'];
	echo "$cust_name\n";
 }
 }
else
{
	echo "Customer Name Not Found";
} 


?>