<?php
$q = intval($_GET['q']);
define (DB_USER, "primarysales");
define (DB_PASSWORD, "S5L7lF01EQZvQrGK");
define (DB_DATABASE, "primarysales_dianaold");
define (DB_HOST, "localhost");
$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);

$sql = "SELECT agent_name FROM agentsmrd where agent_name LIKE '%".$_GET['q']."%'"; 
$result = $mysqli->query($sql);
$custnm = 0;
while($row = $result->fetch_array()){
$custnm =$row['agent_name'];
}
echo ($custnm);
?>
