<?php
include '../db/db.php';
session_start();
$log=htmlspecialchars(trim($_SESSION['user']), ENT_QUOTES, 'UTF-8');
if (empty($log)) {
     
  $redirectUrl = "../index.php";
  echo "<script type=\"text/javascript\">";
  echo "window.location.href = '$redirectUrl'";
  echo "</script>";
	 
}else{

    $id=htmlspecialchars(trim($_POST['id']), ENT_QUOTES, 'UTF-8');

    $sql2=mysqli_query($conn,"DELETE FROM export_item WHERE id = '$id'");

  	echo "<script>alert('Deleted Successfully!')</script>";
    $redirectUrl = "../add_supplier.php";
    echo "<script type=\"text/javascript\">";
    echo "window.location.href = '$redirectUrl'";
    echo "</script>";

}
?>