Hi everyone! I just got done reading this great book on PHP. Now I am working on a presentable product database for end-users to look through. I want to give them the ability to sort the product table instead of having to stick with its default presentation (whatever order it is in the SQL database), and this is where I am stuck!
I have 3 links in my products.php file:
'Sort By SKU', 'Sort By Price', 'Sort By Category' and I would like each of these to do exactly that to the current product page when clicked. So when the page refreshes it has the new sort done. Below these links is the dynamically generated product table.
Is this possible? I have been reading about $_GET, but wasn't sure if this was the route to take or if there was a way to do something else that my book didn't go through. Is this an opportunity to pass a variable in the URL like www.foo.com/products&sort=price or something along those lines?
Any help would be much appreciated!
Thanks!!