\n\n\t"; if(!empty($CategoryID[$one])) { $CategoryContent .= "\n\t\t"; $CategoryContent .= "\n\t\t"; $CategoryContent .= "\n\t\t\t\n\t\t\n"; //get the subcategories $q2 = "select * from counter_subcategories where CategoryID = '$CategoryID[$one]' order by SubcategoryName"; $r2 = mysql_query($q2) or die(mysql_error()); while($a2 = mysql_fetch_array($r2)) { //get the number of sites, registered under this subcategory $q3 = "select count(*) from counter_info where SubcategoryID = '$a2[SubcategoryID]'"; $r3 = mysql_query($q3) or die(mysql_error()); $a3 = mysql_fetch_array($r3); $CategoryContent .= "\n\t\t\n\t\t\n"; } $CategoryContent .= "\t\t
$CategoryName[$one]
$a2[SubcategoryName] ($a3[0])
\n\t"; $CategoryContent .= "\n\t"; } else { $CategoryContent .= " \n\n\t"; } if(!empty($CategoryID[$two])) { $CategoryContent .= "\n\t"; $CategoryContent .= ""; $CategoryContent .= "\n\t\n\t\n\n\n"; //get the subcategories $q2 = "select * from counter_subcategories where CategoryID = '$CategoryID[$two]' order by SubcategoryName"; $r2 = mysql_query($q2) or die(mysql_error()); while($a2 = mysql_fetch_array($r2)) { //get the number of sites, registered under this subcategory $q3 = "select count(*) from counter_info where SubcategoryID = '$a2[SubcategoryID]' "; $r3 = mysql_query($q3) or die(mysql_error()); $a3 = mysql_fetch_array($r3); $CategoryContent .= "\n\t\n\n\n"; } $CategoryContent .= "
$CategoryName[$two]
$a2[SubcategoryName] ($a3[0])
"; $CategoryContent .= "\n\n\t"; } else { $CategoryContent .= " \n\n\t"; } if(!empty($CategoryID[$three])) { $CategoryContent .= "\n\t"; $CategoryContent .= ""; $CategoryContent .= "\n\t\n\n\n"; //get the subcategories $q2 = "select * from counter_subcategories where CategoryID = '$CategoryID[$three]' order by SubcategoryName"; $r2 = mysql_query($q2) or die(mysql_error()); while($a2 = mysql_fetch_array($r2)) { //get the number of sites, registered under this subcategory $q3 = "select count(*) from counter_info where SubcategoryID = '$a2[SubcategoryID]' "; $r3 = mysql_query($q3) or die(mysql_error()); $a3 = mysql_fetch_array($r3); $CategoryContent .= "\n\t\n\n\n"; } $CategoryContent .= "
$CategoryName[$three]
$a2[SubcategoryName] ($a3[0])
"; $CategoryContent .= "\n\n\t"; } else { $CategoryContent .= " \n\n\t"; } $CategoryContent .= "\n"; } } echo $CategoryContent; require_once("template/footer.php"); ?>