Tableau du Button Radio !?
Bonjour
j ai crée un tableau du buttons radio de tel façon que chaque ligne de tableau contient 2 buttons avec le mémé name pour faire après une test sur la valeur choisie sur chaque ligne
Problème que je ne sais pas comment faire ce test ni comment récupéré le tableau du button a vrai dire je suis débutant en PHP :)
aide moi :(
voila le code
Code:
1 2 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 32 33 34 35 36 37 38 39
|
<?php
$connexion = mysql_connect('localhost', 'root', '') OR die('Erreur');
mysql_select_db('pfe') OR die('Sélection de la base impossible');
$requete1 = mysql_query("SELECT distinct t_etudiant.Nom_etud,t_etudiant.Prenom_etud FROM t_etudiant,r_inscrire ,t_formation where t_formation.libelle_classe='".$formation."' and t_formation.id_classe = r_inscrire.id_classe and r_inscrire.id_etud = t_etudiant.id_etud ") OR die('Erreur de la requête MySQL');
$m=0;
?>
<table align="center" width="560" border="1">
<form name="" method="post" action= "saisie2.php" >
<tr> <td bgcolor="#D67701"><div align="center" class="Style11" style="color:#FFFFFF">Present(E)</div></td>
<td bgcolor="#D67701"><div align="center" style="color:#FFFFFF" class="Style11"><b>Etudiant(e)</b></div></td>
<td bgcolor="#D67701"><div align="center" style="color:#FFFFFF" class="Style11"><b>Absent(e)</b></div></td>
<td bgcolor="#D67701"><div align="center" style="color:#FFFFFF" class="Style11"><b>Motif </b></div></td>
</tr>
<?php while($resultat = mysql_fetch_row($requete1))
{
?>
<tr> <td><div align="center" class="Style14"><?php echo '<input type="radio" name="$rad['.$m.']" value="prec" checked />'; ?></div></td>
<td><div align="center" class="Style14"><?php
$nom[$m] = $resultat[0].' '.$resultat[1];
echo ''.$nom[$m] ?></div></td>
<td><div align="center" class="Style14"><?php echo '<input type="radio" name="$rad['.$m.']" value="absent" />' ?></div></td>
<td><div align="center" class="Style14"><?php echo '<input type="text" name="$motif['.$m.']" />' ?></div></td>
</tr>
<?php
$m = $m + 1;
}?>
<tr> <td bgcolor="#D67701"><div align="center" class="Style11" style="color:#FFFFFF"></div></td>
<td bgcolor="#D67701"><div align="center" style="color:#FFFFFF" class="Style11"><b></b></div></td>
<td bgcolor="#D67701"><div align="center" style="color:#FFFFFF" class="Style11"><b></b></div></td>
<td bgcolor="#D67701"><div align="center" style="color:#FFFFFF" class="Style11"><b><?php echo '<input type="reset" value="Annuler" /> <input type="Submit" value="valider" >' ?></b></div></td> |