pagination doesnt link to where clause when new page clicked

后端 未结 1 501
无人及你
无人及你 2021-01-29 10:33

i have a where clause that shows all categorys where the id=the input value from the previouse page. the pagination works giving me the right amount of pages and the where claus

相关标签:
1条回答
  • 2021-01-29 11:03

    Add the category to the links:

    $cat = isset($_REQUEST['category']) ? "&category=" . $_REQUEST['category'] : '';
    ?>
    
    <div id="pagintation">
        <?php for($x = 1; $x <= $pages; $x++):  ?>
            <a href="?page=<?php echo $x . $cat; ?>"><?php echo $x; ?></a>
        <?php endfor;?>
    
    0 讨论(0)
提交回复
热议问题