Re: [PHP] Dynamically generate a drop down list

2003-07-28 Thread skate
Is it possible to have a function which echoes the values as they are read from the database? something like function init_auth_list() { print select name=author option value=\\select the name of the author/option\; $query=select name from author order by name;

Re: [PHP] Dynamically generate a drop down list

2003-07-28 Thread sven
... or even shorter (since php 4.1.0): function init_auth_list() { print select name=author option value=\\select the name of the author/option\; $query=select name from author order by name; $result=pg_exec($GLOBALS[db],$query); while ($row = pg_fetch_row($result)) {

RE: [PHP] Dynamically generate a drop down list

2003-07-28 Thread Dave [Hawk-Systems]
Is it possible to have a function which echoes the values as they are read from the database? something like function init_auth_list() { print select name=author option value=\\select the name of the author/option\; $query=select name from author order by name;