forked from Adleraci/adlerka.top
Add article creation frontend
This commit is contained in:
parent
f9cf2eab8f
commit
e0636c4411
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user