<?php if (!defined('RESTRICTED')) { include ('./../../templates/error/404.php'); } else { ?>

<?php

if (isset($_GET['id'])) {
	$ID = clean($_GET['id']);
} else {
	$ID = clean("");
}

if (validateResourceAccess($inputToken)) {

	$sql_delete = "DELETE FROM tbl_comments WHERE comment_id = '$ID'";
	$delete = $connect->query($sql_delete);
	if ($delete) {
		$_SESSION['msg'] = "Comment deleted successfully...";
		header( "Location: comment.php");
		exit;
	}

} else {
	systemUpdateFlag($invalidResponse);
}

?>

<?php } ?>