<?php
include_once("functions/database.php");
include_once("functions/page.php");
include_once("functions/is_login.php");
get_connection();
echo "新闻发布系统分类浏览：";
echo "<br>";
$selectString1="select * from category";
$resuleSet1=mysql_query($selectString1);
while($categoryName=mysql_fetch_array($resuleSet1)){
$selectString2="select * from news where category_id=$categoryName[category_id]";
$resuleSet2=mysql_query($selectString2);
while($newsContent=mysql_fetch_array($resuleSet2)){
echo "<h2>".$categoryName['name']."</h2>";
echo "主题：".$newsContent['title']."<br>";
echo "新闻内容：".$newsContent['content']."<br>";
}
}
?>
