<?php include "db_connect.php"; if($_SERVER["REQUEST_METHOD"]== "GET" && isset($_GET['action']) && $_GET['action']=='delete'){ $id=check_input($con,base64_decode($_REQUEST['id'])); $delete_stmt = $con->prepare('DELETE FROM `contact_us` WHERE `id` = ? '); $delete_stmt->bind_param('s', $id); $delete_stmt->execute(); if($delete_stmt) { $_SESSION['msg'] = 'delete_data'; header('location: view-inquiry.php');exit; } else { header("location: view-inquiry.php");exit; } } ?>