I have a section on my website where users can post comments. Just above these comments I have 4 links - Oldest, Newest, Top Rated and Worst Rated. Currently I have 4 different pages for each of these links.
oldest.php - sorts the comments by date and time ascending
newest.php - sorts the comments by date and time descending
top.php - sorts the comments depending on how many likes they have
worst.php - sorts the comments depending on how many dislikes they have
They are all being sorted with a mySQL statement such as
$sql = "SELECT * FROM comments ORDER BY date DESC, time DESC LIMIT $offset, $rowsperpage";
I'm just wondering is there any way to order these comments by using just one page instead of having 4 different pages?
Any help would be greatly appreciated.