alicca
asked on
PHP : how to assign variable from mysql to smarty
hi, i want to pull 1 column of data from mysql and put it into
smarty template that use
listmenu or html_option
i have something like this
========================== ========== ========== ========== ========== ========== ========
$query = "SELECT * FROM package";
$query_result = @mysql_query ($query) OR error(mysql_error());
while ($info = @mysql_fetch_array($query_ result))
{
$types_temp = array();
$types_temp = $info['pack_name'];
}
STemplate::assign('types_t emp', $types_temp);
========================== ========== ========== ========== ========== ========== =====
TPL:
<select name="package">
<option value='null'>-- none --</option>
{html_options options=$packnamez.sohai }
</select>
does my TPL correct? i cant figure it work :(
some 1 please help
smarty template that use
listmenu or html_option
i have something like this
==========================
$query = "SELECT * FROM package";
$query_result = @mysql_query ($query) OR error(mysql_error());
while ($info = @mysql_fetch_array($query_
{
$types_temp = array();
$types_temp = $info['pack_name'];
}
STemplate::assign('types_t
==========================
TPL:
<select name="package">
<option value='null'>-- none --</option>
{html_options options=$packnamez.sohai }
</select>
does my TPL correct? i cant figure it work :(
some 1 please help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.