<?php
	include 'includes/session.php';
	include 'includes/sessions.php';

	if(isset($_POST['edit'])){
		$user_id = $_POST['user_id']; 
		$status=$_POST['status'];
	
			# code...

			$sql = "UPDATE users SET status='$status' WHERE id='$user_id' ";
		if($conn->query($sql)){
			$_SESSION['success'] = 'Users Updated successfully';

			
		}
		
		
	}
	
	else{
		$_SESSION['error'] = 'Fill up edit form first';
	}

	header('location:users.php');

?>