 <?php include "layouts/ajax.php"; ?>
 <?php
$pdo = connect();
$keyword = '%'.$_POST['keyword'].'%';
$sql = "SELECT * FROM customer where mfin='$mfin' &&  pno LIKE (:keyword)";
$query = $pdo->prepare($sql);
$query->bindParam(':keyword', $keyword, PDO::PARAM_STR);
$query->execute();
$list = $query->fetchAll();
foreach ($list as $rs) {
	// put in bold the written text
	$pno = str_replace($_POST['keyword'], '<b>'.$_POST['keyword'].'</b>', $rs['pno']);
	// add new option
    echo '<li onclick="set_item(\''.str_replace("'", "\'", $rs['pno']).'\')">'.$pno.'</li>';
}
?>