<?php
session_start();
require 'config/db.php';

$pdo->prepare("
INSERT INTO employee_leave_requests
(employee_id,department,leave_date,reason)
VALUES (?,?,?,?)
")->execute([
    $_SESSION['employee_id'],
    $_SESSION['department'],
    $_POST['leave_date'],
    $_POST['reason']
]);

header("Location: my_leaves.php");
