diff options
author | Cflip <36554078+cflip@users.noreply.github.com> | 2021-01-23 11:24:05 -0700 |
---|---|---|
committer | Cflip <36554078+cflip@users.noreply.github.com> | 2021-01-23 11:24:05 -0700 |
commit | 19a3704acbf9801c0b1491a84828496ef46bc840 (patch) | |
tree | aff00dc7753eb9dff38d4e556f633fd17e0dff79 /reply.php | |
parent | 6a2867481359b185b32955be4de5c3bee4cdc269 (diff) |
Form cleanup and better password hashing
Diffstat (limited to 'reply.php')
-rw-r--r-- | reply.php | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/reply.php b/reply.php deleted file mode 100644 index 051aaa4..0000000 --- a/reply.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -include 'header.php'; -include_once 'connect.php'; - -if ($_SERVER['REQUEST_METHOD'] != 'POST') { - echo 'This file cannot be called directly.'; -} else { - if (!isset($_SESSION['signed_in'])) { - echo 'You must be signed in to reply to a topic.'; - } else { - $sql = "INSERT INTO posts(post_content, post_date, post_topic, post_author) VALUES( - '" . mysqli_real_escape_string($dbc, $_POST['reply_content']) . "', - NOW(), - " . mysqli_real_escape_string($dbc, $_GET['reply_to']) . ", - " . $_SESSION['user_id'] . ")"; - - $result = mysqli_query($dbc, $sql); - - 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>.'; - } - } -} - -include 'footer.php'; - -?>
\ No newline at end of file |