dave416 Posted May 14, 2008 Share Posted May 14, 2008 hey, heres my problem. i have a table of data on a webpage called team-roster.php and its sorted according to 1 of the columns but i also want it to be sortable by other columns via the same file (team-roster.php). im thinking maybe the solution is team-roster.php?sort=height or somewhere along those lines but im not sure how to get there and im confused about the whole thing. i apologize, i am a very recreational web developer. forgot to mention by the way, the table of data is drawn from a mysql database via php. thanks for any help Quote Link to comment Share on other sites More sharing options...
peranha Posted May 14, 2008 Share Posted May 14, 2008 yes, you can do that team-roster.php?sort=height and then on the page it will be $sort = $_GET['sort']; and the query will be Select * FROM table ORDER BY $sort; Quote Link to comment Share on other sites More sharing options...
dave416 Posted May 14, 2008 Author Share Posted May 14, 2008 brilliant, thanks a ton Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.