So sprach Peter Houchin am Tue, Apr 17, 2001 at 10:08:36AM +1000:
> 1: is there a way to populate a list box from a db?

Sure.

> 
> 2: if some one could point me in the right direction, with out actually giving a 
>example, as to how to go about it as i've 
>    got no idea

Uhm, no example?  I'll try.  ... failed *G*

<select name="Listbox" size="42"><?php
  $query = "SELECT ListboxText, ListboxValue FROM Table";
  $rs = mysql_select( $query );
  while( $row = mysql_fetch_object( $rs ) ){
    echo '<option value="';
    echo htmlentities( $row->ListboxValue );
    echo '">';
    echo htmlentities( $row->ListboxText );
  }
?></select>

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                Uptime: 2 hours 3 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to