supprReservation.php 926 Bytes
<?php
if(isset($_GET['banc']) && isset($_GET['moment']) && isset($_GET['personne']) && isset($_GET['heuredebut'])){
	session_start();
	if(isset($_SESSION['identifiant'])){
		$identifiant = $_SESSION['identifiant'];
	}
	include("connexion.php");
	$banc = $_GET['banc'];
	$moment = $_GET['moment'];
	$personne = $_GET['personne'];
	$heuredebut = $_GET['heuredebut'];
	echo "Banc = $banc moment = $moment personne = $personne heuredebut = $heuredebut";
	include("connexion.php");
	$requete = "DELETE FROM reservation WHERE
		numero=$banc and jour='$moment' and login = '$personne' and heuredebut='$heuredebut'";
	$exec_requete = mysqli_query($db,$requete);
	//$reponse = mysqli_fetch_array($exec_requete);
	if($identifiant=="admin"){
		echo "<meta http-equiv=\"refresh\" content=\"0;url=gestionReservation.php\">";
	}else{
		echo "<meta http-equiv=\"refresh\" content=\"0;url=mesReservations.php\">";
	}
	mysqli_close($db);
}
?>