Location: PHPKode > projects > Decider > decider/Analyst/gethint.php
<?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 analyst where Name like '".$q."%'";
$result=mysql_query($q_string,$link);

if (strlen($q) > 0)
{
  $dataset="";
   
  while($row=mysql_fetch_array($result))
  {
   
//added extra parameterhere 
//used letter 'x' instead of 'k'   
	//$dataset=$row['Id'].k.$row['Address'].k.$row['Work_Tel'].k.$row['Home_Tel'].k.$row['Mobile'].k.$row['Email'].k.$row['User_Name'].k.$row['Password'].k;
	//$dataset=$row['Id'].k.$row['Address'].k.$row['Work_Tel'].k.$row['Home_Tel'].k.$row['Mobile'].k.$row['Email'].k.$row['User_Name'].k.$row['Password'].k.$row['Name'].k;
	$dataset=$row['Id'].x.$row['Name'].x.$row['Address'].x.$row['Work_Tel'].x.$row['Home_Tel'].x.$row['Mobile'].x.$row['Email'].x.$row['User_Name'].x.$row['Password'].x;
          
  }
}
$response=$dataset;

//output the response
echo $response;

?>
Return current item: Decider