<?php

//tab confirm restore roles when ok is pressed

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

	for($i=0; $i < $id_count; $i++) {
		$id = $id_array[$i];

		$query = mysqli_query($dbc, "UPDATE user_groups SET status = 1  WHERE `user_group_id` = '$id'");
		if(!$query) { die(mysqli_error($dbc)); }
	}
	header("Location: gateway.php?act=trashed_user_groups&is=Done successfully!"); // redirent after deleting
}
?>
