"; echo "

Désignation des profs de sport

"; if (isset($_POST['mane'])){ $sql = "UPDATE bdsports.profs SET Sport='0'"; $repclients = $bdd->query($sql); for ($i=0; $i<=count($_POST['mane'])-1; $i++) { $sql = "UPDATE bdsports.profs SET Sport='1' WHERE NoProf ='".$_POST['mane'][$i]."'"; $repclients = $bdd->query($sql); } } $query = "SELECT * FROM bdsports.profs ORDER BY NomProf, PrenomProf ASC"; $result = $bdd->query($query); echo "
"; echo ""; $gogus= 1; while($row = $result->fetch()) { if($row["Sport"]==1){ $classe="coche"; }else{ $classe=''; } echo ""; echo ""; echo ""; echo ""; echo ""; $gogus++; } echo "
NomPrénomSport?
".$row["NomProf"]."".$row["PrenomProf"]."
"; echo ""; echo "
"; echo ""; ?>