this is where smarty templating is so cool
using PEAR db

php code

$sql = 'select id, name from names order by name asc';


<select name="name">
{html_options options=$names}

Cole Ashcraft wrote:
How would you create a drop down menu from a database query? I have
figured how to do it with one field, but how could it be done with a
system where the value is different than the displayed value (ie.
numerical code as the value, name displayed)?


-- PHP Database Mailing List ( To unsubscribe, visit:

Reply via email to