Black Eagle Team Minishell
Path:
/
home
/
ccpsafy
/
www
/
private
/
seances_impression
/
[
Home
]
File: seances_impression_supp_x.php
<?php include("../../inc/enligne_param.inc.php"); include ("../../inc/gere_session.inc.php"); //$idAdherent = $_SESSION[id]; //On supprime toutes les séances de l'adherent courant //$req = "DELETE FROM participants_impr WHERE id_adherent='$idAdherent'"; //$rep = mysql_query($req, $con) or die(__line__.$req.mysql_error()); //On récupère le nombre total de séances $nbSeances = $_POST[nbSeances]; //Pour chaque séance for ($cptSeance = 1; $cptSeance <= $nbSeances ; $cptSeance++) { $strSeance = "id_seance_impr".$cptSeance; $idSeance = $_POST[$strSeance]; //Si l'id de la séance est définie (Case cochée), on supprimme la séance de la table seances_impr ainsi que tous les participants dans participants_impr if (!empty($idSeance)) { $req = "DELETE FROM participants_impr WHERE id_seance_impr='$idSeance'"; $rep = mysql_query($req,$con) or die(__LINE__.$req.$mysql.error()); $req = "DELETE FROM seances_impr WHERE id_seance_impr='$idSeance'"; $rep = mysql_query($req,$con) or die(__LINE__.$req.$mysql.error()); } //Sinon on ne fait rien } header("Location: seances_impression.php"); ?>
©
2020 Black Eagle Team