File "reject_program.php"

Full Path: /home/quiczmwg/lightspringdigitals.com/admin/www.youtube.com/reject_program.php
File size: 745 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
session_start();
include '../_db.php'; // Adjust path if needed

if (isset($_GET['id'])) {
    $id = $_GET['id'];

    // Update program status to 'rejected'
    $sql = $conn->query("UPDATE program_subscriptions SET status = 'rejected' WHERE id = '$id'");

    if ($sql) {
        $_SESSION['mgs'] = "<div class='alert alert-success'>🚫 Program subscription rejected successfully.</div>";
    } else {
        $_SESSION['mgs'] = "<div class='alert alert-danger'>❌ Failed to reject program subscription.</div>";
    }

    header("Location: manage_programs.php");
    exit();
} else {
    $_SESSION['mgs'] = "<div class='alert alert-warning'>⚠️ Invalid request.</div>";
    header("Location: manage_programs.php");
    exit();
}
?>