[PHP] RE: holding values in a select list on a form

2001-07-23 Thread Tim Ward
"; print "Select"; if($result = mysql_db_query($db, $query)) while($row = mysql_fetch_row($result)) print "{$row[1]}"; echo ""; ?> although personally I use mysql_fetch_array() so I can use the field name to get the appropriate field

[PHP] Re: holding values in a select list on a form

2001-07-23 Thread Mark Bayfield
I worked it out by doing something like this... "; $toplist = mysql_query("select * from wr_country where wr_country_enabled = 1 "); echo "Select\n"; while(list($topicid, $topics) = mysql_fetch_row($toplist)) { if ($topicid==$topic) { $sel = "selected "; } echo "$to