added "id=" for jump links in replies
parent
a9eb39f179
commit
3d2053c337
|
@ -5,6 +5,7 @@ $_GET values:
|
|||
* id → the board id
|
||||
* action → what action file should be loaded in the bottom section (see below)
|
||||
* valid actions: [not present], post, submit, edit
|
||||
* end → if present, jump to the end of the page
|
||||
### [board.php](./board.php)
|
||||
the top part of a board page, displays the posts, loaded via include()
|
||||
### [post.php](./post.php)
|
||||
|
|
|
@ -10,6 +10,7 @@ foreach($statement->fetchAll() as $ROW) {
|
|||
$post_creator = $statement->fetch();
|
||||
|
||||
// get post content and make sure it doesn't mess with the website
|
||||
$post_id = $ROW['id'];
|
||||
$post_title = htmlspecialchars($ROW['title']);
|
||||
$post_creator_name = htmlspecialchars($post_creator['name']);
|
||||
$post_time = htmlspecialchars($ROW['post_time']);
|
||||
|
@ -22,7 +23,7 @@ foreach($statement->fetchAll() as $ROW) {
|
|||
// post id of the original post this is a reply to, negative numbers mean no reply
|
||||
$reply_to = $ROW['reply_to'];
|
||||
|
||||
echo "<section>
|
||||
echo "<section id=\"$post_id\" >
|
||||
<h1>$post_title</h1>
|
||||
<article>
|
||||
<header>
|
||||
|
|
Loading…
Reference in New Issue