Jump to content

Multiple dropdown (for search)


eevan79

Recommended Posts

Hi,

 

I want to make multiple dropdown select and use it for search but dont know how to do it.

 

For example:

Dropdown1:

list1,list2,list3,list4,

Dropdown2:

type1,type2,type3,type4

Dropdown3:

price1,price2,price3,price4

Dropdown4:

maxprice1, maxprice2, maxprice3...

 

Finaly when user click search result can be:

http://www.mysite.com/?s=Dropdown1+Dropdown2+Dropdown3+Dropdown4

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/188641-multiple-dropdown-for-search/
Share on other sites

Ok. I tried something like this:

<form action="http://mywebsite.net/?s=" target="_blank">

</select><br>
Dropdown1:
<select name='s'>
<option value="list1">list1
<option value="list2">list2
<option value="list3">list3
</select><br>
Dropdown2:
<select name="s">
<option value="type1">type1
<option value="type2">type2
<option value="type3">type3
</select><br>
Dropdown3: </select>
<select name="s">
<option value="price1">price1
<option value="price2">price2
<option value="price3">price3
</select><br>
Dropdown4: </select>
<select name="s">
<option value="maxprice1">maxprice1
<option value="maxprice2">maxprice2
<option value="maxprice3">maxprice3
</select><br>

<input type="submit" value="Search">
</form>

 

And as result I get:

instead of

 

Can this be fixed?

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.