<?php
include '../functions.php';
if (isset($_GET['id']) == true) {
	$id = $_GET['id'];

	$sql = $conn->query("UPDATE withdrawals SET status = 'Approved' WHERE id = '$id' ");
	if (isset($sql) == true) {
		
		echo "<script>alert('Withdrawal has been Approved')</script>";
		echo "<script>window.open('withdrawals', '_self')</script>";
	}else{
		echo "<script>alert('Failed to Approve')</script>";
		echo "<script>window.open('withdrawals', '_self')</script>";
	}
}