Eingaben gehen bei Fehlermeldungen nicht verloren

This commit is contained in:
2026-06-01 11:14:59 +02:00
parent 979378d142
commit 59268dc102
2 changed files with 13 additions and 3 deletions
@@ -4,6 +4,10 @@ require_once '../model/LocalArticleManager.php';
require_once '../model/ArticleManager.php';
if ($_SERVER["REQUEST_METHOD"] === "POST") {
$_SESSION["old_title"] = $_POST["title"] ?? '';
$_SESSION["old_content"] = $_POST["content"] ?? '';
$_SESSION["old_category"] = $_POST["category"] ?? '';
$_SESSION["old_tags"] = $_POST["tags"] ?? '';
if(!isset($_POST["title"]) ||!isset($_POST["content"]) || !isset($_POST["category"])){
$_SESSION["message"] = "missing_parameters";
header("location: ../../index.php?pfad=createArticle");