<?php
    try {
        include("../main.php");
        $request = json_decode(file_get_contents('php://input'));
        extract((array) $request);
        $query = "SELECT `id`, `product_name`, `product_quantity` FROM `booking_details` WHERE `booking_id` = '$id' AND `status` = '1'";
        $dbobjx->query($query);
        $result = $dbobjx->resultset();
        if (count($result) > 0 && !empty($result)) {
            echo response(1, "SUCCESSFULLY OPERATED", $result);
        } else {
            echo response(0, "BAB REQUEST!", []);
        }
        $dbobjx->close();
    } catch (Exception $error) {
        echo response(0, "API ERROR!, UNPROCESSABLE ENTITY", $error->getMessage());
    }
#code ends
#mtech