Imaging we are at home page: www.example.com
we have a hyperlink on this page.
<a href="category/Pizzas">Pizzas</a>
when click this hyperlink, the url at address bar will be:
www.example.com/category/Pizzas
and it will show us the different kinds of pizzas. The problem is I don't have a path like category/Pizzas in my server. The way it works is to pass category and Pizzas to two query strings (page and cat), which will be stored in $_GET. So the real url is :
www.example.com/?page=category&cat=Pizzas
Then there is a function to render the Pizzas page.
You can image we have some other hyperlinks on the main page and they have different urls. For example:
<a href="category/Salads">Salads</a>
<a href="category/Wraps">Wraps</a>
<a href="category/Grinders">Grinders</a>
when you click it, query strings(page and cat) will capture the value from url and render accordingly.
The part I don't understand is how and where to define the query string (in this case: page and cat) and capture value from URL like category/Pizzas so we can have page=category&cat=Pizzas. There is no HTML form for these two query strings in source code. It just works perfectly.
ps. if you are interested, here is the project I'm talking about. This is not my project. https://github.com/nelsonreitz/project0