<?php

//tab confirm restore news when ok is pressed

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

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

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