Forum » » Le coin des codeurs » » Affichage d'un select
Posté : 27 févr. 2007 à 23:19
<table><tr>
<form action=\"".$ThisFile."&subop=changecitation\" method=\"post\" name=\"changecitation\">
<td>Modifier cette citation de $categorie</td>
</tr>
<tr><td>Citation</td></tr>
//affichage citation
$query = mysql_query("SELECT * FROM ".$NPDS_Prefix."citation WHERE id='$id'");
while (list($id,$id_cat,$text)=mysql_fetch_array($query)) {
<input type=\"hidden\" name=\"id\" value=\"$id\">
<input type=\"hidden\" name=\"id_cat\" value=\"$id_cat\">
<tr $rowcolor align=\"center\">
<td rowspan=\"3\"><textarea>$text</textarea></td>
</tr>
//affichage catégorie
<tr><td><select value=\"$categorie\" name=\"newcategorie\">
$sql = mysql_query("SELECT id_cat,categorie FROM ".$NPDS_Prefix."citation_cate order by categorie ASC");
while (list($id_cat,$categorie) = mysql_fetch_array($sql)) {
<option value=\"$id_cat\">$categorie</option> }
</select></td>
</tr>
<tr>
<td><input type=\"submit\" name=\"mettre a jour\" VALUE=\"Valider\" /></td>
</tr>}
</form></table>
Cet article provient de NPDS
https://www.npds.org/viewtopic.php?topic=22015&forum=5