Jump to content
xisto Community

Spectre1405241486

Members
  • Content Count

    4
  • Joined

  • Last visited

Posts posted by Spectre1405241486


  1. You could try storing somewhere (in a hidden POST field or as a GET variable, it doesn't matter) the ID of the last entry displayed, and then only display the next 7 entries after that. Note that although you could calculate the next ID by multiplying the 'per_page' value by the current page, that probably wouldn't be a good idea - if a number was skipped at all in the 'id' field, it wouldn't work.

     

    You could try something like this:

    $last_id = isset($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : 0;$sql='SELECT id, Game_name, Game_link, Game_image ,Game_from FROM `Games` WHERE id >= ' . $last_id . ' ORDER BY id LIMIT ' . $per_page;...// This is AFTER the while() statement - the current $result array will contain the last entry retrieved$last_id = $result['id'];// Nextif ($page != $num_pages) {  echo "<a href=\"index2.php?page=$next_page&id=$last_id\">Next</a>}
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.