<?php 
require 'db.php';
$data = json_decode(file_get_contents('php://input'), true);
if($data['uid'] == '' || $data['id'] == '')
{ 
    $returnArr = array("ResponseCode"=>"401","Result"=>"false","ResponseMsg"=>"Something Went Wrong!");    
}
else
{
    $id = strip_tags(mysqli_real_escape_string($con,$data['id']));
    $uid =  strip_tags(mysqli_real_escape_string($con,$data['uid']));
    $time = strip_tags(mysqli_real_escape_string($con,$data['time']));
    $date =  strip_tags(mysqli_real_escape_string($con,$data['date']));
    
    $con->query("update orders set d_date='$date',d_time='$time',status='completed',rid='0',r_status='delivered' where id='$id' and uid='$uid'");
    $returnArr = array("ResponseCode"=>"200","Result"=>"true","ResponseMsg"=>"Thanks for Ordering");
}
echo json_encode($returnArr);
?>