Can anyone advice which way I can do this. On my site I have the following column headers
Code, Status, Published Name, Email and Link.
I have seen on some sites, where by clicking on the headers you can sort the list by that particular column. Clicking the header again sorts by that column but in the other direction. All columns can be sorted in this way.
I am intrigued on how this is done so that I can inplement it into my current site and future projects.
My current query is
$query_view = "SELECT * FROM photographers ORDER BY PGR_INIT ASC"
I assume that the PGR_INIT (Which is represented by code, hence my current page is all sorted by the photographers unique code) should be replaced by $?????, so that when the column header is clicked the value of $????? is stored and the page is refreshed with this as the value. I am not sure how ASC or DESC would come into the equation though.......
Any advice on how I should start would be much appreciated.