<?php
/*********************************************************************************
 * Gest'Ecole is a school management software developped by
 * DOX Conception Copyright (C) 2012-2013 DOX Conception
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the license published by DOX Conception.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY.  See the Software License for more details.
 * 
 * You should have received a copy of the software license along with
 * this program; if not, see:
 * http://www.doxconception.com/index.php/licence-de-gestecole.html
 ********************************************************************************/

  $id_classe=$_POST['id_classe'];
  $id_niveau=$_POST['id_niveau'];
  $redoublement=$_POST['redoublement'];

  $id_eleve=$_POST['id_eleve'];
  for ($i=0;$i<count($id_eleve);$i++)
  {
    $id2=Construit_Id("eleves_classes",20);
    $req2=mysql_query("INSERT INTO `eleves_classes` (id,id_classe,id_eleve,id_niveau,redoublement) VALUES ('$id2','$id_classe','".$id_eleve[$i]."','".$id_niveau[0]."','$redoublement')");
  }
  
  echo $id_classe;
?>