If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Select option base from the database

Hi,
whats the right codes using the select option that the choices came from the database. In my database i have a table name loan which has a acctNo.
The problem is i want to make the select options that the choices came from the database.
and i made this but i know this is not right.

General idea is to either execute the query, the within a while() loop read each result row via the applicable "fetch" function for the DB extension in question and output the results within <option> tags; or with some DB extensions it's easy to fetch all the results into one PHP array, then do a foreach() loop on that array.