File "index-20260115212227.php"

Full Path: /home/custbahd/tourismfraternity.com/admin/blogs/delete/index-20260115212227.php
File size: 409 bytes
MIME-type: text/x-php
Charset: utf-8

<?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'] = 'Blog deleted successfully';
		}
		
		else{
			$_SESSION['error'] = 'Something went wrong while deleting the blog!';
		}
	}

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