...

View Full Version : Sorting Members By Clicking Link



tomyknoker
03-13-2007, 04:04 AM
Hi all,

I am at a point where I have been able to show all my members that are in my MySQL database... When it displays the list it only shows this info:

FirstName
LastName
State
LastLogin

But it automatically sorts the members by the userId, that's fine for the moment. But how can I make the headings at the top of the list into links that when clicked on sort. So for example if you click on 'Last Name' it will sort all the members by their last name alphabetically, and if you click it again it reverses the sort... Anyone seen this before or have any idea how to do it?

Inigoesdr
03-13-2007, 05:07 AM
Link the sort type and the order in the url. page.php?sort=field&order=desc
Check the user input to make sure it's valid and have a default order.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum