I have a php web page that calls up mysql DB and uses the information as content. I was woundering if someone had some insite on if I put a sort button on the page to sort the information according to a name or date colum. How might I go about doing this and what would happen if more than one person was sorting at the same time.
at the end of your SELECT query, add ORDER BY column_name
Read more about it here: http://www.w3schools.com/php/php_mysql_order_by.asp
As far as more than one person sorting, right now your query is already sorting by a default criteria (the id field most likely) so if you aren't having any problems now, there shouldn't be any problems when you add different sorting options.
I made a link to sort, the way I did it is I just copied my php web page renamed it and change how I was sorting it. So now the link just jump to the other page.
You can also just set the order by column to $_GET['sortby'] and pass the column you want sorted in the URL, for example: domain.com/script.php?sortby=column1
(needs some sql injection protection though)