Anyone see a problem with this code? I cannot find the problem but I think it is in the tpl. I am reading the smarty guide book as I am doing this, but this stuff starts to get confusing.
My php query:
Code:
$brandQuery = "SELECT brand FROM $sql_tbl[products] WHERE forsale='Y' ORDER BY brand";
$brand = func_query($brandQuery);
$smarty->assign("brand",$brand);
My Tpl Select:
Code:
<select name=brand>
<option selected>All</option>
{section name=brand loop=$brand}
<option value="{ $brand[brand].brand }">{ $brand[brand].brand|escape }</option>
{/section}
</select>
This code was taken from a previous post and edited to fit my code, I think written for 3.5.3 and I am on 3.4.14
I am struggling on this one, please help if you can. Thanks