<?php include "configuration.inc.php"; ?>
<?php

if ( !isset($_REQUEST['term']) )
    exit;
	$pur='Pur';
$rs = mysql_query('select * from  tbl_item where   (item_name like "'. mysql_real_escape_string($_REQUEST['term']) .'%" ) order by item_name asc');

$data = array();
//$data1 = array1();
if ( $rs && mysql_num_rows($rs) )
{

/*$data[] = array(
            'label' =>'<table id="example23" class="display nowrap table table-hover table-striped table-bordered" cellspacing="0">
                                        <thead>
                                        <tr><th nowrap="nowrap">Item Name</th></tr> <thead></table> ' ,'value' => ''
           
        ); */
			
			
    while( $row = mysql_fetch_array($rs, MYSQL_ASSOC) )
    {
	$index=$row['id'];
	
	
        $data[] = array(
            'label' =>'<table id="example23" class="display nowrap table table-hover table-striped table-bordered" cellspacing="0" style="width:300px; background:#ffffff;">
                                        <tbody><tr><td  nowrap="nowrap" style=" text-align:left;">'. $row['item_name'] .'</td></tr><tbody></table> ',
            'value' => $row['item_name'],
			'id' => $index,
			
        );
		
	 
    }
	
}

echo json_encode($data);
flush();

?>