<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once '../models/db_connection.php';
require_once '../models/fee_model.php';

$sql = mysqli_query($conn, "DELETE FROM student_payments WHERE id ='$_GET[id]'");

if ($sql) {
    echo "<script>
        alert('Payment deleted successfully');
        window.location.href = 'view_payments.php';
    </script>";
}
