<?php
require("lib/config.php");
require_once 'vendor/eway/eway-rapid-php/include_eway.php';
// =============== Get customer user api ===================================
$data  = $_REQUEST;
$sql = "SELECT * FROM customers where id = '".$_REQUEST['id']."'";
$result = $conn->query($sql);
if ($result->num_rows > 0) 
{
	$sql = "SELECT * FROM `booking` where cid = '".$_REQUEST['id']."'";
	$result = $conn->query($sql);
	if ($result->num_rows > 0) 
	{
		while($row_details = $result->fetch_assoc()) 
		{
			$booking_detail[] = $row_details;
		}
		$Res["data"] = $booking_detail;
		$Res["message"] = "booking info for user"; 
		$Res["staus"] = "OK"; 
	}
	else
	{
		$Res["message"] = "no such result present in booking"; 
		$Res["staus"] = "ok"; 
	}
} 
else 
{
	$Res["message"] = "no such user present in the database!"; 
	$Res["staus"] = "error"; 
}
	
	
echo json_encode(new ArrayObject($Res)); 
//echo "<pre>";
//print_r($Res);
//print_r($data);
//echo "</pre>";
$conn->close();
// =============== New customer user api End Here ==========================


?>