I received this code to show a quick menu of a specific field. It works great!!!
global $conn,$smarty;
$rowsearch=array();
$rstt = db_query("SELECT TropicProducts.Materials, Count(TropicProducts.Materials) AS CountOfMaterials FROM TropicProducts GROUP BY TropicProducts.Materials", $conn);
$ind=0;
while($data=db_fetch_array($rstt))
{
$rows=array();
$MaterialsName = str_Replace(" ","+",$data["Materials"]);
$rows["href"]="TropicProducts_list.php?a=search&value=1&SearchFor=".$MaterialsName."&SearchOption=Contains&SearchField=Materials";
$rows["1Materials_value"]=$data["Materials"]." (".$data["CountOfMaterials"].")<br>";
$rowsearch="<a href=\"".$rows["href"]."\">".$rows["1Materials_value"]."</a>";
echo $rowsearch;
}
How do I change the hyperlink part to open the result in a whole page (_top) Tried
$rowsearch="<a target="_top" href=\"".$rows["href"]."\">".$rows["1Materials_value"]."</a>";
but it gives a parse error.