<?php
include '../functions.php';

if (isset($_GET['id']) == true) {
	$id = $_GET['id'];

	$sql = $conn->query("DELETE FROM tax_codes WHERE id = '$id' ");
	if (isset($sql) == true) {
		echo "<script>alert('Tax Code has been deleted Successfully')</script>";
		echo "<script>window.open('active-tax-codes', '_self')</script>";
	}else{
		echo "<script>alert('Failed to delete Tax Code')</script>";
		echo "<script>window.open('active-tax-codes', '_self')</script>";
	}
}
?>