Jump to content

Multiple value in a list menu


rilana

Recommended Posts

I do have a php script that creates a list from list values. Now I need to add a value to that list someting like that:

<tr> 
      <td width="90" align="left" valign="top"><span class="inhaltTitel">Region: </span></td>
      <td width="450" align="left" valign="top"> <font size="2" face="Arial, Helvetica, sans-serif"> 
        <select name="region" style=width:154>
          <OPTION VALUE="" selected="selected">Ganze Schweiz</OPTION>
          [color=red][font=Verdana]<OPTION VALUE="Linkes Seeufer" "Ganze Schweiz">Linkes Seeufer</OPTION>[/font][/color]
          <OPTION VALUE="Rechtes Seeufer">Rechtes Seeufer</OPTION>
	   <option value="Glarnerland">Glarnerland</option>
		<option value="Graubünden">Graubünden</option>
		<option value="ZH Oberland">Zürich Oberland</option>
          <OPTION VALUE="ZH City">Zürich City</OPTION>
        </select>
        <br>
        <br>
      </font></td>
    </tr>

 

How do I say get all the values that are Linkes Seeufer + all the values that are ganze Schweiz and then list it?

Thanks for helping

Link to comment
https://forums.phpfreaks.com/topic/101966-multiple-value-in-a-list-menu/
Share on other sites

Hi

If a job has the location of ganze Schweiz (all Switzerland) it should also show up when I choos Linkes Seeufer (left side of the lake). I never thaught that this will be a possibility, but I guess there are jobs defined like that (ganze Schweiz). I first thaught that this would only be a search catagory but It's also an input catagory. I hope you understand what I mean. Thanks.

I seem to remember from one of you many other posts (I'm losing the will to live keeping track of your code snippets scattered over this board, so I don't think I can be bothered anymore after this post) that Ganze Schweiz option had no value so if that is selected the region condition is left out of the query (ie no particular region, just look at tham all).

 

If I am looking for a job anywhere I just select programmer and Ganze Schweiss.

The query searches for "...WHERE job = 'programmer' "

 

If I am looking for a programmer job in Zurich I select Zurich and programmer.

The query searches for "...WHERE job = 'programmer' AND region = 'Zurich'"

 

If, as your code (elsewhere) seemed to have, you seach for "...WHERE job = 'programmer' OR region = 'Zurich'"

you get programmers in every region and every job type in Zurich.

 

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.