PK

ADDRLIN : /home/anibklip/vpgldh.com/2022-23bk/webmanager/includes/
FLL :
Current File : /home/anibklip/vpgldh.com/2022-23bk/webmanager/includes/suggest_agents.php

<?php

if ( !isset($_REQUEST['term']) )
    exit;

include "dbconnect.php";

$rs = mysql_query('select ajid, ajname, ajcomp, ajaddress from agents where status="active" && ajcomp like "'. mysql_real_escape_string($_REQUEST['term']) .'%" order by ajcomp asc limit 0,12');

$data = array();
if ( $rs && mysql_num_rows($rs) )
{
    while( $row = mysql_fetch_array($rs, MYSQL_ASSOC) )
    {

	$headid = strip_tags($row['ajid']);
	$headname = strip_tags($row['ajcomp']);
	$headaddress = strip_tags($row['ajaddress']);

        $data[] = array(
            'label' => '→ '.$headname .', '. $headaddress,
            'value' => $headid.', '. $headname.', '. $headaddress ,
        );
    }
}

echo json_encode($data);
flush();



PK 99