<?php 

//tab confirm restore users when ok is pressed

if(($_POST['act']== 'restore_users')) {
	$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 = mysql_query("UPDATE users SET status = 1  WHERE `user_id` = '$id'");
		if(!$query) { die(mysql_error()); }
	}
	header("Location: gateway.php?act=trashed_users&is=Done successfully!"); // redirent after deleting
}
?>