How to work with $_SERVER['QUERY_STRING']

后端 未结 3 466
不知归路
不知归路 2020-12-28 09:35

How to work with $_SERVER[\'QUERY_STRING\'] and pagination?

When my table is sorted by this link:



        
3条回答
  •  [愿得一人]
    2020-12-28 10:12

    Don't use QueryString, just create a variable at the beginning of your script:

    $pagerUrl = $_SERVER['PHP_SELF'].'?sort_name='.$_GET['sort_name']&sort=$_GET['sort'];
    

    And use it in your link:

    echo ''.$i.' ';
    

提交回复
热议问题