I appreciate any help I can get with this problem:
- I have 2 search forms, one does a keyword search and the other does a search by country, state and city (with an input for each)
- The results are output to a table. The header row contains a link for sorting each column.
- Problem is I don't know how to build my GET url string for sorting and assign them to the links in the headers
Here is some code to get started (I am using MVC)
Functions
function searchkeyword()
{
/* get keyword an query and output paginated result */
}
function searchcategory()
{
/* get categories and query and output paginated result */
}
function sort()
{
$sortby = $_GET['sortby'];
}
function paginate()
{
}
View
<th>
<a href="sort.php?XXXX">Sort Column</a>
</th>
I'm not sure what should go in XXXX to sort the results.