<?php 

//tab confirm restore  when ok is pressed

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