<?php
require 'functions/functions.php';
$var = $_GET['courseID'];
$query = "DELETE FROM `$dbname`.`courses` WHERE `courses`.`courseID` = '$var' LIMIT 1";

mysqli_query($conection, $query) or die(mysqli_error());
?>

<script>
location.href='subjects.php';
</script>