sync, implemented sort, viewing user pages & articles written, updating db

This commit is contained in:
2025-04-03 10:50:58 -06:00
parent cec9091ee0
commit e5af3aca66
12 changed files with 231 additions and 54 deletions
+2 -1
View File
@@ -4,7 +4,7 @@ require_once 'functions/functions.php';
include_once 'functions/article_functions.php';
if (!empty($_POST)) {
$id = create_article($_COOKIE['user_id'], $_POST['title'], $_POST['excerpt'], $_POST['tags'], $_POST['markdown']);
$id = create_article($_COOKIE['user_id'], $_POST['title'], $_POST['excerpt'], (isset($_POST['tags']) ? $_POST['tags'] : []), $_POST['markdown']);
header('Location: articles.php?article_id=' . $id);
}
@@ -14,6 +14,7 @@ if (!isset($_COOKIE['role_id']) || $_COOKIE['role_id'] == 4)
include_once 'components/head.php';
echo form();
include_once 'components/foot.php';
function form()