<?php
ob_start();
error_reporting(0);
include("connect.php");
session_start(); 
$ver = $_SESSION["admin_id"];
if(!isset($_SESSION["admin_id"])){
   header('location:http://www.btcover.appexperts.net');
}
date_default_timezone_set('Asia/Calcutta');
	$cdate  = date("Y-m-d");

$da  = date("Y-m-d H:i:s");
$id=$_REQUEST['id'];
$res = mysqli_query($con,"select * from tbl_vehicle_master where vehicle_id='$id'");
$ver1 = mysqli_fetch_assoc($res);
$delete_status=$ver1['status'];

if($delete_status=='Active')
{
	
	$uq1=mysqli_query($con,"update tbl_vehicle_master set status='Deactive',update_datetime='$da' where vehicle_id='$id'");
}
if($delete_status=='Deactive')
{
	$uq1=mysqli_query($con,"update tbl_vehicle_master set status='Active',update_datetime='$da' where vehicle_id='$id'");
}
if($uq1){ header('Location:vehicle-category.php'); }
?>