PDA

View Full Version : Searching using the GET method


jool
08-10-2005, 11:05 AM
Hi,

This is something I've been working on for a while now but seem just to be going round in circles with :( .......

THE PROBLEM
I have a simple search form with two fields menus; Language and Prefecture.

This search form allows you to search for Language Teachers in Japan based on where they live and what Language they speak.

I wish to add an option of 'any' to both Language menu and Prefecture menu.

Therefore if a user wanted to run a search on teachers in Tokyo who speak 'any' language the results would produce this.

However, as no teachers enter 'any' as the language they speak, I had been having trouble getting this to work.

WHAT I"VE DONE SO FAR....

Through some advice I changed the method to POST and in the menu inserted the following values in the menu

<option value="">any</option>

This allowed me to enter the 'any' value and would return all results.

However, the results part of my code is set up in a way which requires the initial Method to be set as GET. Changing to POST has caused me problems.

Does anybody know how to achieve the above using the GET method :blink:

Many thanks for reading this

jool
08-11-2005, 01:00 PM
SORTED! :D

I'm using the $_REQUEST which seems to be handle post and get. Cheers!

:D :D :D