<?php
session_start();
ob_start();
require "../model/configuration.php";
$stfid = $_POST['staff_name'];
$dt=$_POST['adv_date'];
$date = date("Y-m-d",strtotime($dt));
$mnyr=date("Y-m",strtotime($dt));
$amount=$_POST['stff_advance'];
$db->execute("INSERT INTO staff_sal_details(staffid,date,mnthyear,amount) VALUES('$stfid','$date','$mnyr','$amount')");
header("location:../Pages/staff_advance.php");
?>