Xampp version: 1.8.3

PHP version: 5.5.11


<?php
include_once ('includes/connection.php');
include_once ('includes/article.php');

$article = new article;
$articles = $article->fetch_all();
?>


<html>
<head>
<title> CMS tutorial </title>
<link rel="stylesheet" href= "assets/style.css"/>
</head>

<body>
<div class="container">
<a href= "index.php" id= "logo">CMS</a> 
<ol> <?php foreach ($articles as $article) { ?>
<li>
<a href = "article.php?id=<?php echo $article ['article_id'];?>">
<?php echo $article['article_title'];?>
</a> 
<small>  
posted <?php echo Date ('l jS', $article ['article_timestamp']); ?>
</small>
</li>
<?php } ?>
</ol>
</div>

</body>
</html>




>>>>> AND ARTICLE.PHP

<?php
include_once ('includes/connection.php');
include_once ('includes/article.php');

$article = new Article;

if (isset($_GET['id'])) {
$id = $_GET['id'];
$data = $article->fetch_data($id);

?>

<html>
<head>
<title> CMS tutorial </title>
<link rel= "stylesheet" href= "..../assets/style.css"/>
</head>

<body>
<div class ="container">
<a href= "index.php" id= "logo">CMS</a> 
<h4><?php echo $data['article_title'];?>
<small>posted <?php echo date ('l jS', $data ['article_timestamp']);?></small>
</h4>
<p><?php echo $data['article_content'];?> </p>
</div>

</body>
</html>


<?php
} else {
header('location: index.php');
exit ();
}
?>