<?php

//Include necessary files
include_once '../includes/core/init.inc.php';
$my_session->confirm_logged_in();
?>

<?php 
$current_subject = subject::find_subject_by_id($_GET["subject"], false);
?>

<?php 
if (!$current_subject) {
    // subject ID was missing or invlid or
    // subject couldn't be found in database
    utility::redirect_to("manage_content.php");
}
subject::delete_subject($current_subject["id"]);
ob_end_flush();