create-Article-controller Implementation
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
<?php
|
||||
//TODO: implement this.
|
||||
$db::newArticle($_POST['title'], $_POST['content'], $_POST['author']);
|
||||
|
||||
try {
|
||||
$db = Database::getInstance();
|
||||
$author = "max.mustermann@web.de"; // wird später aus session bezogen.
|
||||
$db->newArticle($_POST['post-title'], $_POST['post-content'], $author);
|
||||
} catch (PDOException $e) {
|
||||
//TODO: Exception werfen, wenn das Erstellen des neuen Artikels nicht geklappt hat.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user