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

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

			$sql = "UPDATE users SET name='$name' 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');

?>