Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
<div class="twrapper">
<table class="people">
<thead>
<tr>
<th colspan="3" style="border-bottom: 1.5px solid #4F5B93; text-align: center !important;">
<?php if ($page > 1): ?>
<a class="pagination prev" href="?page=<?php echo $page-1?>">« Previous page</a>
<?php endif ?>
<span class="page"><?php echo $page ?></span>
<?php if ($x == 49): ?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable $x is not yet defined here. Also, it will only be 49 after the foreach loop (when looping over a full "page" of users).

<a class="pagination next" href="?page=<?php echo ++$page?>">Next page »</a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mutating the $page variable here means that it has the wrong value when used (and incremented again) later on.

<?php endif ?>
</th>
</tr>
<tr>
<th></th>
<th>Username</th>
Expand Down