diff options
author | Cflip <36554078+cflip@users.noreply.github.com> | 2021-01-22 21:40:51 -0700 |
---|---|---|
committer | Cflip <36554078+cflip@users.noreply.github.com> | 2021-01-22 21:40:51 -0700 |
commit | b49c2533c5a82332113d125a40712ab50adade81 (patch) | |
tree | f2cd05c698684491f93e492db9124263e148b9da /includes/reply_inc.php | |
parent | df49a36e140acc211fdc31480d40281404110310 (diff) |
Fix broken pages
Diffstat (limited to 'includes/reply_inc.php')
-rw-r--r-- | includes/reply_inc.php | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/includes/reply_inc.php b/includes/reply_inc.php index 7f53fce..480c651 100644 --- a/includes/reply_inc.php +++ b/includes/reply_inc.php @@ -3,6 +3,7 @@ session_start(); include_once 'db_inc.php'; +include_once 'functions_inc.php'; if ($_SERVER['REQUEST_METHOD'] != 'POST') { die('This file cannot be called directly.'); @@ -19,15 +20,8 @@ if (!mysqli_stmt_prepare($stmt, $sql)) { die('Failed to process statement: ' . mysqli_error($dbc)); } -mysqli_stmt_bind_param($stmt, "sii", $_POST['post_content'], $_GET['reply_to'], $_SESSION['user_id']); +mysqli_stmt_bind_param($stmt, "sii", $_POST['reply_content'], $_GET['reply_to'], $_SESSION['user_id']); mysqli_stmt_execute($stmt); +mysqli_stmt_close($stmt); -$result = mysqli_stmt_get_result($stmt); - -if (!$result) { - echo 'An error occurred trying to reply to the post. ' . mysqli_error($dbc); -} else { - echo 'Your reply has been saved, check out <a href="topic.php?id=' . $_GET['reply_to'] . '">the topic</a>.'; -} - -//header("Location: ../topic.php?id=" . $_GET['reply_to']);
\ No newline at end of file +header("Location: ../topic.php?id=" . $_GET['reply_to']);
\ No newline at end of file |