<?php
include"dbinfo.php";

if(isset($_GET['df_id'])){
	$result=mysqli_query($conn,"DELETE FROM `fabric` WHERE `fid`='".$_GET['df_id']."'")or die(mysqli_error($conn));
	if($result)
	header("location:fabric.php");
}

if(isset($_GET['dg_id'])){
	$result=mysqli_query($conn,"DELETE FROM `gsm` WHERE `gid`='".$_GET['dg_id']."'")or die(mysqli_error($conn));
	if($result)
	header("location:gsm.php");
}

if(isset($_GET['dc_id'])){
	$result=mysqli_query($conn,"DELETE FROM `color` WHERE `cid`='".$_GET['dc_id']."'")or die(mysqli_error($conn));
	if($result)
	header("location:color.php");
}

if(isset($_GET['dct_id'])){
	$result=mysqli_query($conn,"DELETE FROM `category` WHERE `ctid`='".$_GET['dct_id']."'")or die(mysqli_error($conn));
	if($result)
	header("location:category.php");
}

if(isset($_GET['ds_id'])){
	$result=mysqli_query($conn,"DELETE FROM `swatch` WHERE `sid`='".$_GET['ds_id']."'")or die(mysqli_error($conn));
	if($result)
	header("location:swatch_display.php");
}

if(isset($_GET['dm_id'])){
	$result=mysqli_query($conn,"DELETE FROM `manufacturer` WHERE `mid`='".$_GET['dm_id']."'")or die(mysqli_error($conn));
	if($result)
	header("location:manufacturer.php");
}

if(isset($_GET['dr_id'])){
	$result=mysqli_query($conn,"DELETE FROM `track_sample` WHERE `ts_id`='".$_GET['dr_id']."'")or die(mysqli_error($conn));
	if($result)
	header("location:report.php");
}


?>