<?php 
ob_start();
session_start();
include("../inc/config.php");

$cond='where 1=1 ';
$search="";$conditions='';

$cli="";

if(isset($_REQUEST['search_text'])){
    $search .=$_REQUEST['search_text'];
}

$cond .= " AND (pin_code like '%" . $search . "%' OR city like '%" . $search . "%' OR state like '%" . $search . "%')";
    $statement = $pdo->prepare("SELECT * FROM pincode  $cond $conditions limit 10");
    $statement->execute();
    $emp_data = $statement->fetchAll(PDO::FETCH_ASSOC);
    $totalData = $statement->rowCount();
    
   /*INR Symbol₹*/
    if($totalData>0){
        foreach($emp_data as $res){
            echo '<div onclick="product_selection('.$res['id'].')">
                   <i class="fa fa-barcode" style="font-size:12px;color:blue"></i> <span awb_id='.$res['id'].' class="drop-down-awb" style="color:blue">'.$res['pin_code'].'</span> <br>
                   City  : <b style="color:#f39c12">'.$res['city'].'</b> <br>
                   State  : <b style="color:#f39c12">'.$res['state'].' </b><br>
                   Service Available  : <b style="color:#f39c12">'.$res['service'].' </b><br>
                   
                 </div>';
        }
        
    }else{
        echo '';
    }
$pdo = null;
?>