<?php

use FontLib\Table\Type\head;

session_start();

$con=mysqli_connect($_SESSION['DB_HOST'], $_SESSION['DB_USER'], $_SESSION['DB_PASS'], $_SESSION['DB_NAME']);

 $id=$_GET['ID'];
 $table=$_GET['table'];
if($table == 'list_sales_tracker'){
$query_delete = mysqli_query($con, "delete from sales_tracker_check where sales_tracker_ID='$id' ");
$link ="../../Inventory/list_sales_tracker";
    header("Location:  $link");
}if ($table == 'sales_tracker') {
    $query_delete = mysqli_query($con, "delete from sales_tracker_check where sales_tracker_ID='$id' ");
    $query_delete = mysqli_query($con, "delete from sales_tracker where ID='$id' ");
    $link ="../../Inventory/sales_tracker";
    header("Location:  $link");
} 
$link ="../../Inventory";
//header("Location:  $link");


