I created a simple webshop with PHP. The header, footer and navigation is fixed and when I click through the navigation only the main area changes and the link changes too (for exaple index.php?page=shop
).
Now I want to use pagination for the articles. Every time I click on another page it will change the link too (for example index.php?page=shop?id=5
). The id
is the page number. But this doesn't work in PHP. It always links me to the start page.
Does anybody know how to do this?
There are only one single question mark in URL in place of two when u pass more than two parameters in URL it should be
index.php?page=shop&id=5
Like arkascha said , index.php?page=shop&id=5 then you get this parameter with $_GET['id'] , check if isset and load next pag.