I noticed that Message-ID: <Lf***********************@news3.tin.it> from
SAN CAZIANO contained the following:
How can I display all the record of a certain field in a combobox after I
have connected to a db in mysql ???
thanks a lot
$select="<select size=\"1\" name=\"select_box_name\">;
$sql="SELECT * from table";
$result = mysql_query($sql);
while ($myrow = mysql_fetch_array($result)){
$select.="<option
value=\"".$myrow['field_value']."\">".$myrow['field_description']."</option>\n";
}
$select.="</select>";
print $select;
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs
http://www.ckdog.co.uk/rfdmaker/