PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
first you should have the href link pass a var to the fetching script.
next you have to change your fetching code so that it automatically fetches records sorted according to the var field.
I posted something similar to this in another thread. Follow this link and look at the last post on the page, it should give you a starting point. viewtopic.php?t=31062&start=0