<?php

//tab confirm restore roles when ok is pressed

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

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

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