lets say your current url is
abcd.com/index.php?r=employee_list&search=sudhir&l1=0&l2=5
where l1= limit 1
and l2= limit 2
you want to make pagination and want to change the limit 1 value.
code
$_GET['l1']=6;
$queryString = http_build_query($_GET, '', '&');
now your query is r=employee_list&search=sudhir&l1=6&l2=20
header ("Location: http://abcd.com/".$queryString ); // redirect to same page with new range
abcd.com/index.php?r=employee_list&search=sudhir&l1=0&l2=5
where l1= limit 1
and l2= limit 2
you want to make pagination and want to change the limit 1 value.
code
$_GET['l1']=6;
$queryString = http_build_query($_GET, '', '&');
now your query is r=employee_list&search=sudhir&l1=6&l2=20
header ("Location: http://abcd.com/".$queryString ); // redirect to same page with new range
No comments:
Post a Comment