bonjour je veux creer un formulaire avec plusieurs boutons pour modifier une ligne du formulaire cest a dire chaque ligne a son propre bouton voici mon 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
 
	<form action="update_price.php" name="form2">	
<table>
 
		<?php
		echo"<table><tr><td border=1><strong>Country</strong></td><td border=1><strong>Price</strong></td> </tr>";
                	require_once('Connections/connex2.php');
		 mysql_select_db($database_connex2, $connex2);
		 $insertSQL = sprintf("select country,amount from price;");
		 $query2 = mysql_query($insertSQL,$connex2) or die(mysql_error());
		$row2 = mysql_fetch_row($query2);
 
		while($row2)
				{
                                  $amount =$row2[1];
 
					echo"<tr border=1><td border=1>";
 
					 echo"<input type=text name=price value=$row2[0]>";
					 echo"</td> ";
					 echo"<td border=1>";
					 echo"<input type=text name=price value=$amount>";
					 echo"</td>
                                         </tr>";
                                         ?>
                                       <td  align="center" bgcolor="#CCCCCC"><input name="Envoyer" id="submite" type="submit" value="Update" ></td>
                                         <?php
				$row2 = mysql_fetch_row($query2);
                                }
 
 
 
 
	?>
	</table>
 
  	<?php
		require_once('Connections/connex2.php');
		 mysql_select_db($database_connex2, $connex2);
	if($submit){
	  		$insertSQL = sprintf("update price set amount=$price where country = '$country';");
		$query = mysql_query($insertSQL,$connex2)or die(mysql_error());
		if($result = mysql_query($insertSQL,$connex2)){
  	 print("<script type=\"text/javascript\">
 alert(\"Successfull Modifications.\");
 window.close();
</script>"
		);
}
 
	}
 
		?>
	</form >
je ne sais si cest correcte mais je sais que ça ne marche pas il me modifie toute la table alors que jeveux simplement modifier la ligne concerner
merci