<?php 	include_once('../../config.php'); 
         
    		 
    		 
    		 
             
      if (isset($_POST['query'])) 
      {
        $inpText = $_POST['query'];
        $sql = 'SELECT * FROM UI__Rgst WHERE cuurentId LIKE :cuurentId';
        $stmt = $conn->prepare($sql);
        $stmt->execute(['cuurentId' => '%' . $inpText . '%']);
        $result = $stmt->fetchAll();
    
        if ($result) {
          foreach ($result as $ky=>$row) 
          {
             $itm =  $row['cuurentId'];
            echo '<a href="javascript:void(0);"  class="list-group-item list-group-item-action border-1">' . $row['cuurentId'] .', '.$row['nm'].'</a>';
          }
        } else {
          echo '<p class="list-group-item border-1">No Record</p>';
        }
      }    	 
?>