Bonjour,
Si jenvoie un id il va sur la table note et recupere les notes de cet eleve comme il y a plusieurs matiere je veuxqu'avec un seul bouton d'envoie je puisse les mettre a jour en meme temps. J'ai essaye cette requette mais seul les modifications d'une matiere sont prises en compte.

voici le code

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
 
<?php
 
include('../includes/fonctions.inc.php');
 
//Modification note
		if(isset($_GET['ok']))
	{
 
 
 
 
		$sql="UPDATE note SET 
		idelevenote='".$_GET['id_eleve']."', matierenote='".$_GET['matieren']."',
		note1='".$_GET['note1']."', note2='".$_GET['note2']."',  note3='".$_GET['note3']."', compo1='".$_GET['compo1']."', semestre1=''
		
		WHERE idnote='".$_GET['id_note']."'  ";
 
		if($result=mysql_query($sql))
	{
		echo "<script type=\"text/javascript\">
		alert('note modifiee')</script>";
		header('location:note.php');
	}
		else 
	{
		echo "<script type=\"text/javascript\">
		alert('erreur verrifier vos parametre')</script>";
	}	}
 
 
//requête de recuperation
if(isset($_GET['id']))
$sql2 = mysql_query( "SELECT * FROM note WHERE idelevenote ='".$_GET['id']."' ");
 
if(mysql_num_rows($sql2)==0)
    		{  echo "PAS DE NOTES DISPONIBLE";
				header('location:noteInscription.php');
 
			}		 
	else
	{
	while($note=mysql_fetch_array($sql2)){
 
 
 
?>
 
<html>
    <head>
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>UPDATE-NOTE</title>
	</head>
 
<body>
 
<form  method="GET" name="noteup" action="noteupdate.php">
					<br /><br /><br />
		<table align="center" width=500px>
	<tr>
		<td width=110px height=25px>id_note <br /><br /></td>
		<td><input type="hidden" name="id_note" value="<?php echo $note['idnote']; ?>" />
			<?php echo $note['idnote']; ?><br /><br />
		</td>
	</tr>	
	<tr>
		<td width=110px height=25px>id_eleve<br /><br /></td>
		<td><input type="hidden" name="id_eleve" value="<?php echo $note['idelevenote']; ?>" />
			<?php echo $note['idelevenote']; ?><br /><br />
		</td>
	</tr>
<tr>
		<td width=110px height=25px>matiere <br /><br /></td>
		<td><input type="hidden" name="matieren" value="<?php echo $note['matierenote']; ?>" />
			<?php echo $note['matierenote']; ?><br /><br />
		</td>
	</tr>		
	<tr>
		<td>
		note1
		</td>
			<td>
			<input type="text" name="note1" value="<?php echo $note['note1']; ?>" size=10 />
			</td>
	</tr>
	<tr>
		<td>
			note2
		</td>
			<td>
				<input type="text" name="note2" value="<?php echo $note['note2']; ?>" size=10 />
			</td>
	</tr>
	<tr>
			<td>
			note3
			</td>
			<td>
				<input type="text" name="note3" value="<?php echo $note['note3']; ?>" size=10 />
			</td>
	</tr>
	<tr>
		<td>
		compo1
		</td>
			<td>
			<input type="text" name="compo1" value="<?php echo $note['compo1']; ?>" size=10 />
			</td>
	</tr>
	<tr>
		<td width=110px height=25px>TRIM<br /><br /></td>
		<td><input type="hidden" name="trim1" value="<?php echo $note['semestre1']; ?>" />
			<?php echo $note['semestre1']; ?><br /><br />
		</td>
	</tr>
 
	<?php }} ?>
	<tr>
		<td colspan="2" align="center"><br />
		<input type="submit" name="ok" value="envoie">
		</td>
	</tr>
			</table>
</form>
 
</body>
</html>