Files
webprogrammierung/php/controller/createArticle-controller.php
T
2026-05-26 18:06:44 +02:00

11 lines
352 B
PHP

<?php
try {
//$db = Database::getInstance();
$db = new ArticleManager();
$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.
}