Hi,

I have a select like below in my form, I want a second box to populate but differently for each activity. I would like to do this by means of something like this (case method really)..

Any help would be much appreciated.. been struggling with it.

Thanks alot,
Chris

If ()
case '1';
query to fill for activity 1
case '2';
query to fill for activity 2
etc..
etc..

Here is my current select for activity - incase its needed to be seen..

<select name="posActivity" id="posActivity">
                  <option selected>Select an option</option>
			      <option value="Abseiling Table Mountain">Abseiling Table Mountain</option>
			      <option value="Breede River Rafting">Breede River Rafting</option>
			      <option value="Table Mountain Hiking">Table Mountain Hiking</option>
			      <option value="Kloofing Suicide Gorge">Kloofing Suicide Gorge</option>
			      <option value="Surfing Cape Peninsula Tour">Surfing Cape Peninsula Tour</option>
			      <option value="Quad Biking Mountain Expedition">Quad Biking Mountain Expedition</option>
			      <option value="Scuba Diving">Scuba Diving</option>
			      <option value="Shark Cage Diving">Shark Cage Diving</option>
			      <option value="Tandem Skydiving">Tandem Skydiving</option>
			      <option value="Sunset Horse Riding">Sunset Horse Riding</option>
			      <option value="Cape Peninsula Tour">Cape Peninsula Tour</option>
			      <option value="Safari">Safari</option>
			      <option value="Wine Tasting">Wine Tasting</option>
			    </select>

Well, will use the easiest method really - not sure which one is best to use in a situation like this - would prefer to have the values in the same PHP file or something similar?

The thing is if you put the values somewhere and you will like to select according to the option selected you will have to use ajax.

This article has been dead for over six months. Start a new discussion instead.