<?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");
$company_id=$_REQUEST['id'];
$res = mysqli_query($con,"SELECT * FROM  tbl_insurance_company where company_id='$company_id'");
$ver1 = mysqli_fetch_assoc($res);
$delete_status=$ver1['status'];

if($delete_status=='Active')
{

	$uq1=mysqli_query($con,"UPDATE tbl_insurance_company SET status='Deactive'where company_id='$company_id'");
}
if($delete_status=='Deactive')
{
	$uq1=mysqli_query($con,"UPDATE tbl_insurance_company SET status='Active' where company_id='$company_id'");
}
if($uq1){ header('Location:insurance_company.php'); }
?>