Personal speech beauty then the following in delete course should be respect the idea that where can not have name linked to that course, that is, if you have name that has that course, it can not be deleted, as would mount the structure , I tried some, but it's complicated, I'm a beginner. below how this course mounted delete so far!
<?php
include "../includes/conexao.php";
$id = $_GET['id'];
$sql = "DELETE FROM curso where id = $id";
$query = mysqli_query($conexao, $sql);
if($query){
header("location: curso.php?mensagem=sucesso");
}else{
header("location: curso_excluir.php?mensagem=erro");
}
?>