Simple website with some JavaScript games.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
814 B

  1. <?php
  2. //5-17-17
  3. if($loggedIn)
  4. {
  5. echo '<h1 class="w3-text-teal"><center>User\'s Personal Records
  6. </center></h1>';
  7. $q = "select score, users.user_name username from scores inner join users on users.user_id=scores.user_id where scores.user_id='" . $_SESSION['user_id']
  8. . "' and game='$game_id' order by score desc limit 20";
  9. $r = $db->query($q);
  10. echo '<div class="w3-responsive w3-card-4"><table
  11. class="w3-table w3-striped w3-bordered"><thead>';
  12. echo '<tr class="w3-theme">
  13. <td>User Name</td>
  14. <td>Score</td>
  15. </tr></thead><tbody>';
  16. while($row = $r->fetchArray())
  17. {
  18. echo '<tr>';
  19. echo '<td>' . $row['username'] . '</td>';
  20. echo '<td>' . $row['score'] . '</td></tr>';
  21. }
  22. echo '</tbody></table></div>';
  23. }