<?php
//get the q parameter from URL
$q=$_GET["q"];//lookup all hints from array if length of q>0
require("../common/database.php");
//$con=mysql_connect("localhost","root","123");
//mysql_select_db("deciderdb",$con);
$q_string="select * from client where Name like '".$q."%'";
$result=mysql_query($q_string,$link);
if (strlen($q) > 0)
{
$dataset="";
while($row=mysql_fetch_array($result))
{
//using 'x' instaed of 'k'
$dataset=$row['Address'].x.$row['Tel'].x.$row['Email'].x.$row['Website'].x.$row['Description'].x;
}
}
$response=$dataset;
//output the response
echo $response;
?>