<?php 

//tab confirm restore users when ok is pressed

if(($_POST['act']== 'restore_staffs')) {
	$id_array = $_POST['staff']; // return array
	$id_count = count($_POST['staff']); // count array
	
	for($i=0; $i < $id_count; $i++) {
		$id = $id_array[$i];
	
		$query = mysqli_query(dbc(),"UPDATE staff SET status = 1  WHERE `id` = '$id'");
		if(!$query) { die(mysql_error()); }
	}
	("Location: gateway.php?act=trashed_staffs&is=Done successfully!"); // redirent after deleting
}
?>