<?php 
include("conn.php"); 
 if(isset($_POST["employee_id"]))  
 {  

      $query = "SELECT * FROM users WHERE id = '".$_POST["employee_id"]."'";  
      $result = mysqli_query($conn, $query);  
      while ($row=mysqli_fetch_array($result)) {
          $name=$row['fname'];
          $sname=$row['sname'];
          $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." ". $sname?> </p>
     <form action="edit/user_status.php" method="post">
        <input type="hidden" name="id" 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="user" class="btn btn-secondary" >Close</a>
    </form>
     </div>
