From e0636c4411609438d5f5732340d4cd44446ff1c7 Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 22 Feb 2024 12:25:03 +0100 Subject: [PATCH] Add article creation frontend --- lib/newsarticle.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/newsarticle.php b/lib/newsarticle.php index d021504..82a5b78 100644 --- a/lib/newsarticle.php +++ b/lib/newsarticle.php @@ -25,8 +25,8 @@ function addNewsArticle($title="Nazov", $body="Obsah") :array $output = ["Status" => "Fail"]; // Default Status is "Fail" if (isLoggedIn()) { - $query = $mysqli->prepare("INSERT INTO NewsArticles (WrittenBy, Title, Body, FileList) VALUES (?, ?, ?, ?);"); - $query->bind_param("issi", $_SESSION["id"], htmlspecialchars($title), htmlspecialchars($body), 0); + $query = $mysqli->prepare("INSERT INTO NewsArticles (WrittenBy, Title, Body, FileList) VALUES (?, ?, ?, 0);"); + $query->bind_param("issi", $_SESSION["id"], htmlspecialchars($title), htmlspecialchars($body)); $query->execute(); if ($query->affected_rows > 0) { $output["Status"] = "Success";