My website has a Subsection landing page which lists Article Summaries (i.e. Title, Thumbnail, Short Summary).
Because this listing will continue to grow over time, I am adding Sorting to the page as well as Pagination.
Currently I have a single drop-down call "Sort By" with choices like this...
Code:Date (Newest to Oldest) Date (Oldest to Newst) Title (A to Z) Title (Z to A) Rating (Highest to Lowest) Rating (Lowest to Highest)
Here is what I need help with...
After a user selects a choice above, and clicks on the "Go" command button, I want to somehow take the sort criteria and place it into the Query String.
Here is how I expect the URL + Query String to look...
I spent all of this time re-tooling how my URL looks to maximize SEO, and so I want the URL + Query String to look like above so Google can use that to crawl my website.Code:www.debbie.com/finance/markets/?sortname=by-date&sortdir=desc&page=1
In January I create a Private Message module which had sorting on each column in the Inbox. To handle the sorting there, I just used PHP to toggle whether an up-arrow or down-arrow appeared, and behind the icon was a hyperlink, so creating a Query String was easy in that case.
However, I am really lost as to how I can take a Form submission - and either a GET or POST request - and use that data to build the Query String?!
Certainly this must be a common problem for which there is already an eloquent - and secure - solution?!
Your help is appreciated!