<?php 
include("conn.php"); 
 if(isset($_POST["employee_id"]))  
 {  
     
     
      $query = "SELECT * FROM menu WHERE id = '".$_POST["employee_id"]."'";  
      $result = mysqli_query($conn, $query);  
      while ($row=mysqli_fetch_array($result)) {
        $id_item= $row['id'];
          $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/menu_status.php" method="post">
        <input type="hidden" name="ids" value="<?php echo $_POST['employee_id']?>">
        <input type="hidden" name="status" value="<?php echo $sta?>">
        <button name="submit" class=" btn btn-danger  m-2">Yes</button>
        <a href="<?php echo $item_location?>" class="btn btn-secondary m-2" >Close</a>
    </form>
     </div><?php }?>
