Hello Friends,
I have a page hwere i echo out my search results from my mysql database. by defualt the echo results are sort by date desc. but i want to jump menu that will have the following;
Sort by Date in Ascendind order
Sort by Date in Descending order
Sort by IP in Ascendind order
Sort by IP in Descending order
Sort by Location
What i want to do is that if i select "Sort by IP in Ascendind order" from the jump menu, the result on the page should be sorted by IP in ascending order, or if i select "Sort by Location" the result should be sorted by Location on this same page.
Plsease how do i go about it?
Regards
adsegzy
Sorting my records using the Jump menu
Moderator: General Moderators
Re: Sorting my records using the Jump menu
create a dropdown that will call the script like
and in your script, put something along the lines of this pseudocode
Code: Select all
search.php?sort=1Code: Select all
if($sort==1)
{sort by date}
if($sort==2)
{sort by something else}