<?php
chdir('../../');
require_once 'autoload.php';
$types = new exam_types_controller;

if ($_SERVER['REQUEST_METHOD'] === 'GET' && isset($_GET['csrf_token']) && isset($_GET['csrf_form_id']) && $waf->csrf_validate($_GET['csrf_form_id'], $_GET['csrf_token'], $utility->action_name())) {

$types->destroy($_GET['id']);

$utility->setMessage("success", 'Exam type deleted');

header("location:../exam_types");

}else{
header("location:../exam_types");
}
?>
