<?php
include("../connect.php"); 
$response = array();
if(isset($_POST['vehicle_id']) && isset($_POST['status']))
{
	$vehicle_id = $_POST['vehicle_id'];
	$status = $_POST['status'];
	date_default_timezone_set('Asia/Calcutta');
	$cdate  = date("Y-m-d")." ".date('h:i:sa');
	$res_product_stock = mysqli_query($con,"SELECT vehicle_type FROM  tbl_vehicle_master where vehicle_id='$vehicle_id'");
	if(mysqli_num_rows($res_product_stock)>0)
	{	
		$uq2=mysqli_query($con,"update tbl_vehicle_master set status='$status',update_datetime='$cdate' where vehicle_id='$vehicle_id'"); 
		$response['success']='1';
		$response['details']="Update Status Successful";			
	}
	else
	{
		$response['success']='0';
		$response['details']="Id Not Valid";
	}
}
else
{
	$response['success']='0';
	$response['details']="Required field missing";
}	
echo json_encode($response);
?>