<?php


if(($_POST['act']== 'block_user')) {
	$id_array = $_POST['user']; // return array
	$id_count = count($_POST['user']); // count array

	for($i=0; $i < $id_count; $i++) {
		$id = $id_array[$i];
		$query = mysqli_query($dbc, "UPDATE  `users`  SET user_status = 0 WHERE `user_id` = '$id'");
		if(!$query) { die(mysqli_error($dbc)); }
	}
	header("Location: gateway.php?act=view_users&is=Update done successfully."); // redirent after deleting
}
?>
