";
$nbeleve = $_POST['eleve'];
echo "Suppression d'un élève
";
if (isset($_POST['supp'])){
$sql = "DELETE FROM bdsports.eleves WHERE NoEleve='".$nbeleve."'";
$repclients = $bdd->query($sql);
if ($repclients){
echo "Vous avez supprimé l'élève de la liste!";
}else{
echo "Il y a eu une erreur pendant la suppression";
}
}else{
$rqclients = "SELECT * FROM bdsports.eleves WHERE NoEleve='".$nbeleve."' LIMIT 1";
$repclients = $bdd->query($rqclients);
$c = $repclients->fetch();
echo "";
echo "Prénom: | ".$c['PrenomEleve']." |
";
echo "Nom: | ".$c['NomEleve']." |
";
echo "Sexe: | ".$c['SexeEleve']." |
";
echo "Classe: | ".$c['ClasseEleve']." |
";
echo "
";
echo "";
}
echo "";
?>