<?php
include "layouts/db_connect.php";

    $response = Array();

    $response['status'] = false;

    $query = mysqli_query($conn, "SELECT `name`, `vno` FROM `customerdetails` WHERE `hpl` = '".$_POST['value']."' LIMIT 1"); //Or you can use = instead of LIKE if you need a more strickt search
 $query2 = mysqli_query($conn, "SELECT `postamt` FROM `otherentry` WHERE `hpl` = '".$_POST['value']."'  order by id desc"); //Or you can use = instead of LIKE if you need a more strickt search
    if(mysqli_num_rows($query)) {
        $userData = mysqli_fetch_assoc($query);

        $response['userData'] = $userData;
          $userData1 = mysqli_fetch_assoc($query2);

        $response['userData1'] = $userData1;
        $response['status'] = true;            
    }

    echo json_encode($response);