<?php 

//tab confirm restore  when ok is pressed

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