unset der Eingaben verschoben
This commit is contained in:
@@ -71,7 +71,6 @@ include_once 'php/controller/showArticle-controller.php';
|
||||
if (isset($title) && !empty($title)){echo htmlspecialchars($title);
|
||||
}elseif (isset($_SESSION['old_title']) && !empty($_SESSION['old_title'])){
|
||||
echo htmlspecialchars($_SESSION['old_title']);
|
||||
unset($_SESSION['old_title']);
|
||||
}
|
||||
|
||||
?>"
|
||||
@@ -81,7 +80,6 @@ include_once 'php/controller/showArticle-controller.php';
|
||||
if (isset($content) && !empty($content)){echo htmlspecialchars($content);
|
||||
}elseif (isset($_SESSION['old_content']) && !empty($_SESSION['old_content'])){
|
||||
echo htmlspecialchars($_SESSION['old_content']);
|
||||
unset($_SESSION['old_content']);
|
||||
}
|
||||
?>
|
||||
</textarea>
|
||||
@@ -146,7 +144,6 @@ include_once 'php/controller/showArticle-controller.php';
|
||||
if (isset($tags) && !empty($tags)){echo htmlspecialchars($tags);
|
||||
} elseif (isset($_SESSION['old_tags']) && !empty($_SESSION['old_tags'])){
|
||||
echo htmlspecialchars($_SESSION['old_tags']);
|
||||
unset($_SESSION['old_tags']);
|
||||
}
|
||||
?>"
|
||||
placeholder="z.B. Technik, IT (mit Komma trennen)">
|
||||
|
||||
@@ -87,6 +87,10 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
exit();
|
||||
}
|
||||
$_SESSION["message"] = "article_updated";
|
||||
unset($_SESSION['old_title']);
|
||||
unset($_SESSION['old_content']);
|
||||
unset($_SESSION['old_category']);
|
||||
unset($_SESSION['old_tags']);
|
||||
// Weiterleitung zur Homepage
|
||||
header("location: ../../index.php?pfad=showArticle&id=$id");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user