testing
This commit is contained in:
@@ -20,7 +20,18 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
|||||||
$author = "max.mustermann"; // TODO: später aus Session den angemeldeten Nutzer beziehen.
|
$author = "max.mustermann"; // TODO: später aus Session den angemeldeten Nutzer beziehen.
|
||||||
$tags = $_POST["tags"];
|
$tags = $_POST["tags"];
|
||||||
|
|
||||||
$articleManager->addArticle($title, $content, $category, $author, $tags);
|
//$articleManager->addArticle($title, $content, $category, $author, $tags);
|
||||||
|
$articles[] = [
|
||||||
|
//"id" => count($articles)+1,
|
||||||
|
"title" => $title,
|
||||||
|
"content" => $content,
|
||||||
|
"author" => $author,
|
||||||
|
"category" => $category,
|
||||||
|
"tags" => $tags,
|
||||||
|
//"creationDate" => date("Y-m-d H:i:s")
|
||||||
|
];
|
||||||
|
$articleManager->saveArticle($articles);
|
||||||
|
|
||||||
foreach ($articleManager->getAllArticles() as $article) {
|
foreach ($articleManager->getAllArticles() as $article) {
|
||||||
echo htmlspecialchars($article['title'])."<br>";
|
echo htmlspecialchars($article['title'])."<br>";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user