
Forum » » Le coin des codeurs » » Affichage d'un select
Posté : 28-02-2007 16:26 
echo "<select name=\"categorie\">";
$result = mysql_query("SELECT id_cat,categorie FROM ".$NPDS_Prefix."citation_cate order by categorie ASC");
while($categorie = mysql_fetch_assoc($result)) {
echo "<option value=\"".$categorie["id_cat"]."\"";
if($categorie["id_cat"] == $id_cat)
echo " selected=\"selected\"";
echo ">".$categorie."</option>";
}
echo "</select>";
Cet article provient de NPDS REvolution 16
https://lab.grottes-et-karsts-de-chine.org/viewtopic.php?topic=22015&forum=5