diff --git a/html/forum/edit.php b/html/forum/edit.php new file mode 100644 index 0000000000..aa55e06f0d --- /dev/null +++ b/html/forum/edit.php @@ -0,0 +1,51 @@ +thread); + + $post->update($_POST['content']); + + header('Location: thread.php?id='.$thread->id); +} + +doHeader('Forum'); + +$logged_in_user = get_logged_in_user(); +$post = getPost($_GET['id']); +if ($logged_in_user->id != $post->user) { + // Can't edit other's posts. + echo "You are not authorized to edit this post."; + exit(); +} +?> + +

+ Edit Post +
Forum +

+ +

+

+ + + + + + + + + + + +
Edit Your Post
Message content
+ +
+
+

+ + \ No newline at end of file