| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 
 |  
<?php
  $supp = isset($_POST["supp"])? $_POST["supp"] : '';
  $err_supp='';
  //echo  "ok";
  if(isset($_POST["supprimer"])) {
    $controle=true;
	echo  "ok";
	if($supp=='') {
		$err_supp = "Aucun champ n'a été séléctionné.";
		$controle=false;
	  }	
	if ($controle) {
		include("connexion.php");
		echo '<SCRIPT language="JavaScript">
		if confirm("Voulez-vous vraiment supprimer")
		  {
		    foreach ($_POST["supp"] as $id) 
		     {
		       $requete="delete from participants where id_participants=". intval($id);
		       $execution=mysql_query($requete)or die(mysql_error());
		     }
			 window.location = "liste_participants.php"; 
		  }
		  else window.location = "liste_participants.php";
		  
		</SCRIPT>';
		} 
 
  }
?> |