|
include ("banner.php"); ?>
Links
include ("menu.php"); ?>
include("connect.php"); $query="select distinct category from federation_links order by category asc"; $result=mysql_query($query) or die("Cannot find any categories"); while ($catlist=mysql_fetch_array($result,MYSQL_ASSOC)) { $catname=$catlist['category']; if ($catname<>"") { echo "$catname "; }; // end if empty category name $query2="select * from federation_links where category='$catname' order by title asc"; $result2=mysql_query($query2) or die("Cannot find any links"); while ($linklist=mysql_fetch_array($result2,MYSQL_ASSOC)) { $linkid=$linklist['id']; $linktitle=$linklist['title']; $linkurl=$linklist['url']; echo ""; echo "$linktitle"; echo " "; echo $linkurl; echo ""; echo " "; }; // end while links in category echo " "; }; // end while category mysql_free_result($result); mysql_free_result($result2); mysql_close($link); ?> |