I've searched the website for my question, but i havent found anything. Here's is my situation and i am a newbie so take it easy on me:
I have two pages (list.php AND list_name.php) list.php filters all my records according to what the user clicks on another page (if they click "food", then in list.php, all the records with "food" will show, and so on). Now list_name.php is when they click on a link in list.php that says "sort in alphabetical order".
My problem is this lets say i have more links in list.php, i dont want to have to create more pages to display the information. For example if i want to sort in descending order, i have to create list_namedescending.php, then on that page, code it so that it shows the selected records in descending order. how can i code it so that list.php is the main page. i was thinking something like this
Code: Select all
WHERE alpha = 'colalpha' OR WHERE desc = 'coldesc'thank you in advance