';
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
list($id, $title) = $row;
$content .= "
$title\r\n";
}
$content .= '';
$title = 'Available Articles';
} else {
// get the article info from database
$query = "SELECT title, content, time FROM news WHERE id='" . mysql_real_escape_string($_GET['id']) . "' LIMIT 1";
$result = mysql_query($query) or die('Error : ' . mysql_error());
$row = mysql_fetch_array($result, MYSQL_ASSOC);
$title = $row['title'];
$content = $row['content'];
$time = $row['time'];
}
include 'library/closedb.php';
?>
|
// when displaying an article show a link
// to see the article list
if(isset($_GET['id']))
{
?>
Article List
|