rilana Posted April 20, 2008 Share Posted April 20, 2008 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 More sharing options...
Barand Posted April 20, 2008 Share Posted April 20, 2008 If you select "Ganze Schweiz" then that includes ALL the regions, so why do you need to select another if that is selected? Link to comment https://forums.phpfreaks.com/topic/101966-multiple-value-in-a-list-menu/#findComment-521913 Share on other sites More sharing options...
rilana Posted April 20, 2008 Author Share Posted April 20, 2008 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. Link to comment https://forums.phpfreaks.com/topic/101966-multiple-value-in-a-list-menu/#findComment-521961 Share on other sites More sharing options...
Barand Posted April 20, 2008 Share Posted April 20, 2008 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. Link to comment https://forums.phpfreaks.com/topic/101966-multiple-value-in-a-list-menu/#findComment-522014 Share on other sites More sharing options...
rilana Posted April 22, 2008 Author Share Posted April 22, 2008 Hi Barand, Yes I do remeber you helping me out quite a lot. And it was verry helpfull and allwyas apprichiate it. But I dont understand why you are upset about me posting. Just wondering what I am doing wrong. Link to comment https://forums.phpfreaks.com/topic/101966-multiple-value-in-a-list-menu/#findComment-523981 Share on other sites More sharing options...
Barand Posted April 22, 2008 Share Posted April 22, 2008 Because this topic code is related to code you posted in another earlier topic so I'm having to remember what I read in the earlier one in order to answer this one (or waste time looking for the other topic). Link to comment https://forums.phpfreaks.com/topic/101966-multiple-value-in-a-list-menu/#findComment-524201 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.