I can display the table directly on the form, but I need it to be displayed only when I press a key, and then I can return to the start page.
<table border="0" style="width:100%"> <tr> <th>Позиция</th> <th>Имя</th> <th>Очки</th> </tr> <?php require("processing.php"); $db = new DB(); $result = $db->selectAllScores(); //$numrows = $result->num_rows; if($result){ // echo $result; $count = 1; while($row = mysqli_fetch_array($result)) { echo "<tr>"; echo "<td>". $count ."</td>"; echo "<td>". $row['username'] ."</td>"; echo "<td>". $row['score'] ."</td>"; echo "</tr>"; $count++; if($count == 11) { break; } } } ?> </table> Alas, friends with JS are bad, so I didn’t figure out what to do with the output of tables