Dynamic HTML table sort with PHP

From: Date: Fri, 07 Jul 2006 16:26:57 +0000
Subject: Dynamic HTML table sort with PHP
Groups: php.windows 
Request: Send a blank email to php-windows+get-27063@lists.php.net to get a copy of this message
Good Day List, Does anybody know of a pure PHP way to make table header cells trigger a column sort? If I have a table header that contains a link that when clicked resubmits the page to itself with the proper sort query variables (e.g. index.php?sortBy=ORDER_ID&sortOrder=ASC), I want PHP to rewrite the sortOrder query string to be "sortOrder=DESC" and then "sortOrder=ASC" the next time column heading is clicked. This way, the column will sort like windows columns and users will feel "at-home" with the process. I can write some JavaScript that will dynamically rewrite the href attribute of the link, but I was hoping for a pure PHP solution in case JavaScript is disabled. Thanks. Ken Vandegrift kvandegrift@sharis.com <mailto:kvandegrift@sharis.com> Web Administrator Sharis Mgmt. Corp

« previous php.windows (#27063) next »