<?php
include('dbconnect.php');
session_start();

if(isset($_POST['update']))
{
	$id = $_POST['id'];
	
	$query = "DELETE FROM users WHERE id='$id'";
	$query_run = mysqli_query($connection, $query);
	
	if($query_run)
    {
		$_SESSION['status'] = "<p style='padding:15px; background: #000; color: #fff; border-radius:10px;'>User Deleted</p>";	
		header('location:../members.php');
	}
    else
    {
		$_SESSION['status'] = "error.. user data not deleted";
		header('location:../members.php');
	}	
}
?>