diff options
author | cflip <36554078+cflip@users.noreply.github.com> | 2021-04-25 17:47:41 -0600 |
---|---|---|
committer | cflip <36554078+cflip@users.noreply.github.com> | 2021-04-25 17:47:41 -0600 |
commit | df9177492976ba968a556a52cc155477652089dc (patch) | |
tree | 0d418e435b5d39325180b201d0dfd4868be42df0 /includes | |
parent | 2d5cf9448edb1eb6785c1532ccb031b0ba0d1ef0 (diff) |
Reload page after submitting a reply to a thread
Diffstat (limited to 'includes')
-rw-r--r-- | includes/reply_inc.php | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/includes/reply_inc.php b/includes/reply_inc.php deleted file mode 100644 index 873d516..0000000 --- a/includes/reply_inc.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -include_once 'functions_post.php'; - -session_start(); - -if ($_SERVER['REQUEST_METHOD'] != 'POST') { - die('This file cannot be called directly.'); -} - -if (!Session::get()->is_signed_in()) { - die('You must be signed in to reply to a thread.'); -} - -$reply_content = filter_input(INPUT_POST, 'reply_content', FILTER_SANITIZE_STRING); -$thread_id = filter_input(INPUT_POST, 'reply_to', FILTER_SANITIZE_NUMBER_INT); - -$thread = new Thread(); -$thread->get_from_database($thread_id); - -create_post($reply_content, $thread_id, $thread->category); - -header("Location: ../thread.php?id=" . $_GET['reply_to']);
\ No newline at end of file |