I have a page which displays all my results from the db, and when I select the column heading of any of the rows it is sorted in the opposite manner in which it is currently listed. I pass two paramaters in the URL, the order in which to sort and the column name.
I have a section (different php file than the above) where there are drop downs and radio buttons in which users can perform certain queries. I currently have radio buttons which can be selected to display the results in ascending and descending order.
I wanted to implement the same sorting feature I had when I viewed all the results, the problem is when I select the row, I would have to call the query which was just performed and adding a variable to it to sort it in ascending and descending order.
I submit the results with a form, and the form on the page calls itself.
How do I keep track of the last query performed so that I know how to sort the data?
Thanks
edit: I was looking at the memberlist to see how it sorts, and it does it by sending all the variables in the URL, would that be the best way?