phpbar.de logo

Mailinglisten-Archive

AW: [php] Problem mit Select-Feld

AW: [php] Problem mit Select-Feld

Andre Steffens php_(at)_phpcenter.de
Fri, 24 Aug 2001 16:07:20 +0200


$query = "select * from ref_tab";
$result = mysql_query($query,$conn_id);

?><select size=1 name=feld><?
while ($erg = mysql_fetch_assoc($result)){

  echo "<option value='".$erg['id']."';
  if ($erg['id'] = $var) echo " selected";
  echo ">".$erg['value']."</option>";

}
?></select><?

Gruß
Andre



php::bar PHP Wiki   -   Listenarchive