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

if (isset($_GET['id']) == true) {
	$id = $_GET['id'];
	$query = $conn->query("DELETE FROM withdrawals WHERE id = '$id' ");
	if (isset($query) == true) {
		echo "<script>alert('Withdrawal deleted Successfully')</script>";
		echo "<script>window.open('withdrawals', '_self')</script>";
	}else{
		echo "<script>alert('Failed to delete withdrawal, Please try again')</script>";
		echo "<script>window.open('withdrawals', '_self')</script>";
	}
}

?>