<?php

include_once 'include/db.php';

	if(isset($_GET['delClass'])){
	$delClass = $_GET['delClass'];
	$query = "DELETE FROM discounts_by_class WHERE id='$delClass'";
	$run_delete = mysqli_query($conn, $query);
	if($run_delete){
	echo "<script>alert('This Class Deleted Successfully')</script>";
	echo"<script>window.open('discounts','_self')
	</script>";
	}}


	if(isset($_GET['delData'])){
	$delClass = $_GET['delData'];
	$query = "DELETE FROM booking_db WHERE id='$delClass'";
	$run_delete = mysqli_query($conn, $query);
	if($run_delete){
	echo "<script>alert('Data Deleted Successfully')</script>";
	echo"<script>window.open('customer_data','_self')
	</script>";
	}}


?>