It is necessary to select all rows of the MySQL table, starting with the last one (maximum id ) and display 15 records each, and you also need to create a button that, when clicked, MySQL will display 15 more records. It's like on VK.
<?php function printResult ($result_set) { while (($row = $result_set->fetch_assoc()) != false) { echo $row["story"]; echo "</br>"; } } $mysqli->query ("SET NAMES 'utf8'"); $result_set = $mysqli->query("SELECT * FROM `story` "); printResult ($result_set); $mysqli->close() ?>