<?php 

require_once '../includes/DbOperations.php';

$response = array();

if($_SERVER['REQUEST_METHOD'] == 'POST'){

	if(isset($_POST['username'])){
		$db = new DbOperations();

		$username = $_POST['username'];
	

			$user = $db->getOrdersByUsername($username);


			// $response['error'] = false;
			// $response['id'] = $user['id'];
			// $response['orders'] = $user['orders'];
			// $response['user'] = $user['user'];
			// $response['day'] = $user['day'];
			// $response['update_time'] = $user['update_time'];

}else{
	echo "Invalid Request";
}
header('Content-Type: application/json');
// echo json_encode($response);
 }