Mutliple Autocomplete

Sir I have these codes
[php]









Code


Party




[/php]

and autocomplete.php has these codes

[php]<?php
include_once(“includes/connectsql.php”);
$searchTerm = $_GET[‘term’];
$query = “SELECT * FROM master WHERE desc1 LIKE '”.$searchTerm."%’";
$select = sqlsrv_query($con,$query) or die (“Error”. sqlsrv_errors($con)) ;
while ($row=sqlsrv_fetch_array($select))
{
$data[] =$row[‘code’].’ - '. $row[‘desc1’];
}
//return json data
echo json_encode($data);
?>[/php]

The codes replies this data

When I Enter the name of any CONTACT then his name + his code appear in same textbox
But I want the code to appear in CODE text box,
I want to get code and name in separate boxes.

In screenshot, I pressed ALI.

Please help

Sponsor our Newsletter | Privacy Policy | Terms of Service