<?php 
include 'conn.php';
$data = [];

$stock= $_POST['stock'];
 
$desc = "SELECT * FROM `engine_room_report` where Stock='$stock'";
 
$descRes = $mysqli->query($desc);
while($rowDesc = mysqli_fetch_assoc($descRes)){
  
    $data[] =  $rowDesc;
 
}
 if(count($data)>0){
    $response['status'] = true;
    $response['response'] = "Data Exist";  
    $response['data'] = $data;  
    die(json_encode($response));
 }else{
    $response['status'] = false;
    $response['response'] = "No Data Exist";  
    die(json_encode($response));    
 }

 


?>