Re: Re: Dropdown menus from DB query

From: Date: Fri, 18 Jun 2004 16:09:56 +0000
Subject: Re: Re: Dropdown menus from DB query
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-34835@lists.php.net to get a copy of this message
Smarty Templating? I've heard of that before, but can you tell me a little more about it? Is it built into PHP, or does it need to be installed separately? Thanks to everyone who helped me, Cole pete M wrote:
this is where smarty templating is so cool using PEAR db php code $sql = 'select id, name from names order by name asc'; $smarty->assign('names',$db->getAssoc($sql)); template <select name="name"> {html_options options=$names} </select> 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)? Thanks, Cole
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

« previous php.db (#34835) next »