<?php

session_start();

include "../includes/admin_auth.php";
include "../config/database.php";

if(!isset($_GET['id'])){

    header("Location: registrations.php");

    exit();

}

$id=(int)$_GET['id'];

$sql="UPDATE registration_payments
SET status='rejected'
WHERE id=?";

$stmt=$pdo->prepare($sql);

$stmt->execute([$id]);

$_SESSION['success']="Registration rejected.";

header("Location: registrations.php");

exit();

?>