<?php
  session_start();
  if(empty($_SESSION['branch']) || $_SESSION['branch'] == ''){
    header("Location: index.php");
    die();
  }
    require_once 'system/conn.php';

$delete=$conn->query("DELETE FROM `salary_payment_date` WHERE `id`='".$_GET['id']."'");
if($delete){
    echo "<script>alert('Salary payment data deleted successfully.')</script>";
    echo "<script>window.location.href = 'salary-payment.php'</script>";
  }
?>