Hello,
I am working on a spreadsheet / table layout and want my users to be able to sort by the various columns in the table. The table heading descriptions and the data are in two MySQL tables.
Currently, my thinking is that the best way to do this is insert an image (up arrow or down arrow) below the header row in the html table that the user will click to sort assending or descending by that column. I currectly can dynamically create the table heading, inset the arrow image in all of the row two cells and retrieve the data into the table. Although I have been able to insert a hyperlink with the image, it hasn't done me much good.
I'm assuming that I should be able to dynamically assign a variable value to the image (hyperlink?) in each cell and use that position value to get the name of the column that will be sorted (from the array that I pulled the column headers from), and then pass that variable to an SQL query to pull the sorted values from the server. So far, it's a nice theory...
I a completely hung up on how I can have the user click on an image and pass that imput to PHP to requery the database.
If anyone knows about a tutorial I can study (or example of something like this), or if anyone has an idea of where to go with this, I would be grateful.
Thanks in advance.
CJY