Update createArticle-controller.php
This commit is contained in:
@@ -14,7 +14,7 @@ try {
|
|||||||
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
if(!isset($_POST["title"]) ||!isset($_POST["content"]) || !isset($_POST["category"])){
|
if(!isset($_POST["title"]) ||!isset($_POST["content"]) || !isset($_POST["category"])){
|
||||||
$_SESSION["message"] = "missing_parameters";
|
$_SESSION["message"] = "missing_parameters";
|
||||||
header("location:" . $abs_path . "index.php?pfad=createArticle");
|
header("location:" . $abs_path . "/index.php?pfad=createArticle");
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$title = $_POST["title"];
|
$title = $_POST["title"];
|
||||||
@@ -26,7 +26,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
|||||||
//$articleManager->addArticle($title, $content, $category, $author, $tags);
|
//$articleManager->addArticle($title, $content, $category, $author, $tags);
|
||||||
|
|
||||||
// Weiterleitung zur Homepage
|
// Weiterleitung zur Homepage
|
||||||
header("location:" . $abs_path . "index.php");
|
header("location:" . $abs_path . "/index.php");
|
||||||
exit();
|
exit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user