I have read a ton of stuff on this and just can't get my brain around it. I am pulling two columns from MySQL by using post on a form. The result look something like this carat color cut 1.00 yellow round 2.00 clear emerald how can I make the headers be links that when click resorts the table by that column? can I do this with POST?
yes , you can . you can add a variable called : sort=by-the-variable and you send this variable to the query .
ok the results are pulled from one post.... i am not sure hwo to make the link on the header change that variable.... even if this how to ask that question....
what i meant was , what you can do is : call the page (self) , add give it a post variable : $_GET["SortOption"]; and in the code you test : if the $_GET["SortOption"]; isset you make a specific query .... if it's not you make the regular query . adding the option can be as easy as just : a href="index.php?SortOption=name"
Let AJAX sort it for you: http://www.workingwith.me.uk/articles/scripting/standardista_table_sorting Or change the form to GET to make your life easier.