18 lines
462 B
PHP
18 lines
462 B
PHP
<?php
|
|
if(isset($_GET["ID"])){
|
|
if(!empty($_GET["ID"])){
|
|
include_once("lib/articles.php");
|
|
include_once("lib/users.php");
|
|
|
|
$article = getArticle($_GET["ID"]);
|
|
|
|
$authorName = getUserName($article["author"]);
|
|
|
|
$content = "<h1>".$article["title"]."</h1><article>".$article["content"]."</article><span>written by ".$authorName." on ".$article["date"]."</span>";
|
|
}else{
|
|
$content = "Article ID is empty";
|
|
}
|
|
}else{
|
|
$content = "No article ID set";
|
|
}
|