Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP paging problem!

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #38982
    schart
    Participant

    This is basically my paging system right now:

    
    $limit = mysql_escape_string($_GET);
    if (empty($limit)){
    $limit = "1";
    }
    $page = $limit * 10;
    $flim1 = $page / 10;
    $flim = $page - 10;
    /* So basically, the 'p' is the page number, and $flim is "from" and $limit is "to"
    so this is at the end of the query I use to get my posts, feed or whatever */
    ... LIMIT $flim, $page");
    ?>

    In my login, this would mean that if the page number is one, it would chose everything from 1 to 10, which is correct. But when I come to page number two, i get 20!

    Can you see something I’m doing wrong here?

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.