From 37c0827cdf53899bd69928d2c507e64545ef6161 Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 22 Feb 2024 12:25:32 +0100 Subject: [PATCH] Add article creation frontend --- lib/newsarticle.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/newsarticle.php b/lib/newsarticle.php index 82a5b78..bc26a6e 100644 --- a/lib/newsarticle.php +++ b/lib/newsarticle.php @@ -26,7 +26,7 @@ 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 (?, ?, ?, 0);"); - $query->bind_param("issi", $_SESSION["id"], htmlspecialchars($title), htmlspecialchars($body)); + $query->bind_param("iss", $_SESSION["id"], htmlspecialchars($title), htmlspecialchars($body)); $query->execute(); if ($query->affected_rows > 0) { $output["Status"] = "Success";