/
new_post.php
38 lines (30 loc) · 992 Bytes
/
new_post.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php require_once("shared/cookies.php"); ?>
<?php require_once("shared/functions.php"); ?>
<?php require_once("shared/header.php"); ?>
<?php
if ( !isset($_POST['thread_id']) || $_POST['thread_id'] == "" ) {
redirect_to("not_found.php");
}
if ( !logged_in() ) {
redirect_to("no_permission.php");
}
?>
<?php $thread_id = $_POST['thread_id']; ?>
<div class="outerBox">
<div class="titleBox">Reply to thread</div>
<form method="post" action="validation.php">
<div class="innerBox">
<?php
connect_to_database();
select_database();
?>
Reply To: <?php echo get_value_from_db("threads", "thread_name", "thread_id", $thread_id); ?>
<textarea name="content" cols="10" rows="10" class="postText"></textarea>
</div>
<div class="lowerBox">
<input type="hidden" name="thread_id" value="<?php echo $thread_id; ?>" >
<input type="submit" name="submit" value="Reply" class="buttonMain">
</div>
</form>
</div>
<?php require_once("shared/footer.php"); ?>