html_options

From: Date: Fri, 13 May 2005 00:17:43 +0000
Subject: html_options
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12625@lists.php.net to get a copy of this message
I'm trying to build a select/option list off of a database select. I've confirmed that the correct data is coming out of the query. My options are empty in the template though. This is my first attempt at html_options. I'm doing something wrong, any help? TIA PHP: // Build job selector pulldown $sql_job_pulldown = "SELECT Job FROM t_jobinfo;"; if($result = $mysqli->query($sql_job_pulldown)) { // dump into a select statement // fetch associative array $smarty->assign('JOB_OPTION', $result); $result->close(); } TEMPLATE: <td align='center'>Job Name</td> <td align='center'> <select name='job_name'> {html_options options=$JOB_OPTION} </select> </td> -- J

« previous php.smarty.general (#12625) next »