MattKenefick
asked on
Whats the best way to sort a list / table by ASC or DESC when you have variables in the URL line?
I have a search that returns results, and when you search.. the address bar is like..
http://example.com/?var1=als&var2=sljl&var3=sfjlsa&var4=saflsd
That then pulls the variables, puts them in a MySQL query and returns results in a table depending on how many it finds...
I want to be able to sort the results by ASC or DESC. Right now I just have it set as Order By Var1 ASC.....
But when I click on Var 2 or Var 3 or whatever, I want it to change what its sorting by... I'm not sure how to tell it what to sort by
without erasing the top line or whatever. Any ideas?
http://example.com/?var1=als&var2=sljl&var3=sfjlsa&var4=saflsd
That then pulls the variables, puts them in a MySQL query and returns results in a table depending on how many it finds...
I want to be able to sort the results by ASC or DESC. Right now I just have it set as Order By Var1 ASC.....
But when I click on Var 2 or Var 3 or whatever, I want it to change what its sorting by... I'm not sure how to tell it what to sort by
without erasing the top line or whatever. Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.