Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2011
    Thanked 0 Times in 0 Posts

    stop changing the URL after a search

    I have a file search file "search.php" and after a search the link is changed to "search.php?type=&name=&class=black&submit=submit" (or whatever the search was. I`m using GET from a dropdown menu to select the value that I search).
    So, how can I do to stop changing the URL name after submit the search?

    I need this because I have real problems pagining the results.

    thank you

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    No matter what you have to change something. Regardless of if you post or get the search, the criteria will either show directly or be transposed into some sort of searchid type cache when you move from page to page.
    Paging it is only a matter of adding a single additional field to indicate what page you are on. The link still has to include either the search criteria or a cached id.
    The only other route would be to use sessions. I don't really like this approach though since its quite difficult to handle it properly since you cannot tell when the user has "finished" with their search, and all that criteria will still stick around and show when they hit the search menu again.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts