<?php
    include'connection.php';
    
    $opId=$_GET['id'];
    $status=$_GET['status'];
    if($status==0)
    {
        $update="UPDATE operator SET Active='1' WHERE Id='$opId'";
        if(mysqli_query($con,$update))
        {
            header('location:add_operator.php');
        }
    }
    else
    {
        $update="UPDATE operator SET Active='0' WHERE Id='$opId'";
        if(mysqli_query($con,$update))
        {
            header('location:add_operator.php');
        }
    }
    

?>