<?php
include 'DBConnection.php';

$id = $_POST['id'];


if($_POST['option'] == 'approve')
{
	$sql = "UPDATE leaveform SET `Status` = '1' where leaveid = $id";
	 mysqli_query($connection, $sql);

}else if($_POST['option'] == 'reject')
{
	$sql = "UPDATE leaveform SET `Status` = '0' where leaveid = $id";
	 mysqli_query($connection, $sql);
}
header("Location:index.php");
?>