missing_id
This commit is contained in:
@@ -5,6 +5,7 @@ require_once 'php/model/ArticleManager.php';
|
||||
|
||||
if (isset($_GET["id"])){
|
||||
try {
|
||||
$id = (int)$_GET["id"];
|
||||
$articleManager = ArticleManager::getInstance();
|
||||
$article = $articleManager->getArticle($_GET["id"]);
|
||||
if($article != null){
|
||||
|
||||
@@ -9,7 +9,9 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
$_SESSION["message"] = "missing_parameters";
|
||||
header("location: ../../index.php?pfad=updateArticle");
|
||||
exit();
|
||||
} else {
|
||||
} elseif(!isset($id)) {
|
||||
$_SESSION["message"] = "missing_id";
|
||||
}else{
|
||||
|
||||
$newTitle = $_POST["title"];
|
||||
$newContent = $_POST["content"];
|
||||
|
||||
Reference in New Issue
Block a user