<?php include('includes/config/config.php'); include('log_entry.php'); $location = $_REQUEST['location']; $cylinder_number = $_REQUEST['cylinder_number']; $type = $_REQUEST['type']; $sql = "SELECT * FROM oxygen_cylinder where `loc` = '$location' and `oxygen_kit_no` = '$cylinder_number' and `type` = '$type'"; error_log($sql); $exicute = mysqli_query($conn, $sql); $fetch = mysqli_fetch_assoc($exicute); if (mysqli_num_rows($exicute) > 0) { echo $fetch['id']; }else{ echo 0; } ?>