Bonjour,
J'ai créer une page ou je recupere toutes les données d'une table dans un tableau (voir ci dessous). A chaque fin de ligne il y a un bouton modifier et un bouton supprimer (qui supprime donc une seule ligne à la fois).
Cependant je ne vois pas du tout quel code associer a ces boutons et comment m'y prendre ...
Quelqu'un peut il m'aider ?
Merci d'avance
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 <center><a class="titre">Liste des Statuts</a></center> <br><br><br> <table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolor="#000066"> <tr> <center> <th bgcolor='#99CCFF' width="5%">Num</th> <th bgcolor='#99CCFF' width="5%">Nom</th> <th bgcolor='#99CCFF' width="10%">Couleur</th> <th bgcolor='#99CCFF' width="68%">Description</th> <th bgcolor='#99CCFF' width="6%">Modifier</th> <th bgcolor='#99CCFF' width="6%">Effacer</th> </center> <? // Creation et envoi de la requete $query = "SELECT num_statut, nom_statut, description_statut, couleur_statut FROM statut"; $result = mysql_query($query); // Recuperation des resultats while($row = mysql_fetch_row($result)) { $Num = $row[0]; $Nom = $row[1]; $Couleur = $row[3]; $Description = $row[2]; echo "<tr>\n <td bgcolor='#99CCFF'> $Num </td>\n <td bgcolor='#99CCFF'> $Nom </td>\n <td bgcolor='#99CCFF'> $Couleur </td>\n <td bgcolor='#99CCFF'> $Description </td>\n <td bgcolor='#99CCFF'><center><a href=modifier_statut.php><img src='ok.jpg'></a></center> </td>\n <td bgcolor='#99CCFF'><center><a href=supprimer_statut.php><img src='ok.jpg'></a></center> </td>\n </tr>\n "; } ?> </tr> </table>
Partager