Jump to content

how to refine search with form, by changing _GET variables


turpentyne

Recommended Posts

From a previous search page that passes form variables via _GET to a new results.php page. On this page, I'm building a form down the side, to refine the search results.

 

But I can't seem to remember the javascript to put into the form to update several $_Get variables in the url, and reload the page, so that the php runs and narrows results.

 

I'm sure it was pretty simple. I just don't remember and can't seem to find something does/explains what I want.

 

 

thanks!

 

 

In your form where you refine search results, how is it setup? some dropdowns/text fields and you resubmit?  If you just make your form method='get' instead of 'post' it will make the request to your action='...' as appended to the URL instead of as a post request.

I think I got this part figured out. It was simpler than I thought. I have the dropdowns set with an onselect function that changes an $_Get item in the url and reloads the page.

 

But now I need to figure out another snippet. Is there a snippet to present the dropdowns based on the url _gets that are already at the top? If I select one button, it works fine. If I select a second button, it works - but loses the first button's choice.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.