<?php 
include("conn.php"); 
 if(isset($_POST["employee_id"]))  
 {  
      $data=$_POST['employee_id'];
      $query = "SELECT * FROM menu_cat WHERE id = '".$_POST["employee_id"]."'";  
      $result = mysqli_query($conn, $query);  
      while ($row=mysqli_fetch_array($result)) {
          $name=$row['name'];
          $status=$row['status'];
          $text='';

          if ($status==='1') {
            $text='Active';
            $read='btn-success';
            $de='deactivate';
            $sta=0;
          }
                                     else {
            $text='Inactive';
            $read='btn-danger';
           $de='activate';
           $sta=1;
          }


 }  
}
 ?>
<?php include("common/head.php");?>
<div class="activate-itme text-center m-5">
     <p class="activate"> Are you sure you want to  <?php echo $de ." ". $name?> </p>
     <form action="edit/cat_status.php" method="post">
        <input type="hidden" name="id" value="<?php echo $data?>">
        <input type="hidden" name="status" value="<?php echo $sta?>">
        <button name=submit class=" btn btn-danger btn-sm m-2">Yes</button>
        <button data-dismiss="modal" class=" btn btn-success btn-sm m-2">No</button>
    </form>
     </div>
