<?php
 include("../conn.php");
 if (isset($_POST['submit'])) {
     $id=$_POST['id'];
     $sta=$_POST['status'];
 
     
     $sql = "UPDATE users SET status='$sta' WHERE id='$id' ";
     $query_run = mysqli_query($conn, $sql);
         
         
     if($query_run){
     echo"<script>alert('Status Updated'); window.location='../users.php'</script>";
     }
     }
 
       ?>