php - (Help) Get results from multiple dropdown with one submit button -


i make 4 horizontal dropdown menu. here code :

<div class="menusearching" id="searching">     <div class="menu1" id="menu1">         <p> lembaga</p>             <form style="margin-top:-20px;margin-left:-2px;">                 <select name="droplembaga" autofocus required id="droplembaga">                     <option value="no" selected="selected">---choose one---</option>                     <option value="flashcom">flashcom</option>                     <option value="internusa">internusa</option>                     <option value="hexacompare">hexacompare</option>                 </select>              </form>     </div>     <div class="menu2" id="menu2">         <p> paket kursus</p>             <form style="margin-top:-20px;margin-left:-2px;">                 <select name="dropbahasa" autofocus required id="dropbahasa">                     <option value="no" selected="selected">---choose one---</option>                     <option value="web">kursus web design</option>                     <option value="flash">kursus flash animation</option>                     <option value="marketing">kursus internet marketing</option>                 </select>              </form>     </div>     <div class="menu3" id="menu3">         <p> lokasi</p>             <form style="margin-top:-20px;margin-left:-3px;">                 <select name="droplokasi" autofocus required id="droplokasi">                     <option value="no" selected="selected">---choose one---</option>                     <option value="timur">surabaya timur</option>                     <option value="barat">surabaya barat</option>                     <option value="utara">surabaya utara</option>                     <option value="selatan">surabaya selatan</option>                 </select>              </form>     </div>     <div class="menu4" id="menu4">         <p> harga</p>             <form style="margin-top:-20px;margin-left:-2px;">                 <select name="dropharga" autofocus required id="dropharga">                     <option value="no" selected="selected">---choose one---</option>                     <option value="harga1"> kurang dari rp.750.000</option>                     <option value="harga2">rp.750.000 - rp.1.500.000</option>                     <option value="harga3">rp.1.500.000 - rp.2.500.000</option>                     <option value="harga4">lebih dari rp.2.500.000</option>                 </select>              </form>     </div>     <div>     <input name="submitbutton" type="submit" id="submitbutton" formmethod="post" value="search">     </div> </div> 

my question, how make submit button these multiple dropdown (and results)?

is code above efficient?

thank answer!

first thing change form tags divs keep formatting.

<div class="menu1" id="menu1">     <p> lembaga</p>     <div style="margin-top:-20px;margin-left:-2px;">         <select name="droplembaga" autofocus required id="droplembaga">             <option value="no" selected="selected">---choose one---</option>             <option value="flashcom">flashcom</option>             <option value="internusa">internusa</option>             <option value="hexacompare">hexacompare</option>         </select>      </div> </div> 

next need surround entire form <form></form> tags. place open form tag below opening of first div.

<div class="menusearching" id="searching">     <form action="" method="post">     <div class="menu1" id="menu1">         .         .         .     </div>     <div class="menu2" id="menu2">         .         .         .     </div>     <div class="menu3" id="menu3">         .         .         .     </div>     <div class="menu4" id="menu4">         .         .         .     </div>     <div>         <input name="submitbutton" type="submit" id="submitbutton" formmethod="post" value="search">     </div>     </form> </div> 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -