 <?php
require 'db.php';
 header( 'Content-Type: text/html; charset=utf-8' ); 
$data = json_decode(file_get_contents('php://input'), true);

$uid = $data['deli_code'];
$status = $data['status'];
if ($uid =='' or $status =='')
{
$returnArr = array("ResponseCode"=>"401","Result"=>"false","ResponseMsg"=>"Something Went wrong  try again !");
}
else 
{
	$con->query("update assist_settings set delivery_status='$status' where deli_code='$uid' and status = '1'");
	if($status == '1')
    $returnArr = array("ResponseCode"=>"200","Result"=>"true","ResponseMsg"=>"Status Changed");
    else
    $returnArr = array("ResponseCode"=>"200","Result"=>"false","ResponseMsg"=>"Status Changed");
}
echo json_encode($returnArr);
mysqli_close($con);
?>