<?php
	session_start();
	include_once('../../../db/saucerer.php');

	if(isset($_GET['id'])){
		$sql = "UPDATE blogs SET deleted = '1' WHERE id = '".$_GET['id']."'";

		//use for MySQLi OOP
		if($conn->query($sql)){
			$_SESSION['success'] = 'Video blog deleted successfully';
		}
		
		else{
			$_SESSION['error'] = 'Something went wrong while deleting the video blog!';
		}
	}

	header('location: ../');
?>