Bonjour,
j'ai un probleme que j'arrive pas à le résoudre.
mon code affiche les types d'évaluations créé par un prof,et une liste des étudiants,mon prob c'est que chaque étudiant aura une note pour chaque type,donc il faut créer un input pour chaque étudiant,selon le nb de types.j'éspere qur c'rst clair voila mon code:
voila le résultats dans l'image.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 mysql_connect("localhost","root","") or die(mysql_error()); mysql_select_db("bapfe")or die('Pas de Base de donn\351'); $sql1= mysql_query("(SELECT t.TYPE FROM TYPE AS t, assocts AS l, smodule AS s, filiere AS f WHERE t.idT = l.idT AND l.idS = s.idS AND nomF = '$e' AND annee =$d AND nomS ='$c')"); while($result=mysql_fetch_array($sql1)) { $type1 = $result['TYPE']; echo "<th>".$type1."</th>"; } echo"<th><input type='text' name='note1' value='' /></th>"; ?> <?php mysql_connect("localhost","root","") or die(mysql_error()); mysql_select_db("bapfe")or die('Pas de Base de donn\351'); $sql= mysql_query("select * from etudiant"); while($result=mysql_fetch_array($sql)) { $num = $result['num']; $nom = $result['nomE']; $prenom = $result['prenom']; ?> <tr> <th><?php echo $num; ?></th> <th><?php echo $nom; ?></th> <th><?php echo $prenom; ?></th> <th><input type='text' name='note2' value=''/></th>//le prob </tr> <?php } ?>
je veux créer les inputs dynamiquement selon le nb des types.
pouvez vous m'aidez svp merci d'avance.
Partager