sync, implemented sort, viewing user pages & articles written, updating db
This commit is contained in:
+2
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user