! php 怎么提交多个多项列表

WBOY
Release: 2016-06-13 10:11:48
Original
877 people have browsed it

紧急求助! php 如何提交多个多项列表
小白发帖求助。。。如截图所示,目前网页上有4个单选列表和多个多选列表,目的是用户点击Submit 按钮,后台获取已选择的选项,然后再在数据库中搜索,最后返回相应的搜索结果。 

可是现在我都不知道如何在点击Submit后,获取user的选择的选项。 就是说关于Submit 的PHP 代码该怎么写啊啊。中间貌似还要涉及到转义字符的问题,求大家帮助!

附:代码片段和网页截图 (表单里的内容都是一些机械的feature,希望用户可以通过选择feature,搜索到所需的机械型号)

1) 这是一个单选列表

HTML code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><div id="fourth" class="selection_options"><select name="case_mounting" size="1" title="case and mounting">  <option value=' 1" SQR. PANEL'> 1" SQR. PANEL</option>  <option value='0.95"X1.75" PANEL'>0.95"X1.75" PANEL</option>  <option value='2"X3" FLAT PACK PANEL'>2"X3" FLAT PACK PANEL</option>  <option value="HAND HELD CALIBRATOR">HAND HELD CALIBRATOR</option>  <option value="EXP. PROOF CONDUIT">EXP. PROOF CONDUIT</option>  <option value='1.45"X2.55" PANEL'>1.45"X2.55" PANEL</option>  <option value='NEMA 4X2.6"X3.7" CONDUIT/WALL'>NEMA 4X2.6"X3.7" CONDUIT/WALL</option>  <option value='1.6"X2" PANEL'>1.6"X2" PANEL</option>  <option value='AVIATION 1" DIAMETER'>AVIATION 1" DIAMETER</option>  <option value="DINRAIL">DINRAIL</option>  <option value='3 1/2" BARREL PANEL'>3 1/2" BARREL PANEL</option>  <option value="1/8 DIN PANEL">1/8 DIN PANEL</option>  <option value="1/4 DIN PANEL">1/4 DIN PANEL</option>  <option value='4" SWITCHBOARD PANEL'>4" SWITCHBOARD PANEL</option>  <option value='1.5"X2.9"X2" PANEL'>1.5"X2.9"X2" PANEL</option>  <option value='6"X1" EDGEWISE PANEL'>6"X1" EDGEWISE PANEL</option>  <option value='6"X1.75" EDGEWISE PANEL'>6"X1.75" EDGEWISE PANEL</option>  <option value='6.6"X1.4" EDGEWISE PANEL'>6.6"X1.4" EDGEWISE PANEL</option>  <option value='11.3"X1.4" EDGEWISE PANEL'>11.3"X1.4" EDGEWISE PANEL</option>  <option value='7"X1.4" EDGEWISE PANEL'>7"X1.4" EDGEWISE PANEL</option>  <option value='7.3"X2.8" EDGEWISE PANEL'>7.3"X2.8" EDGEWISE PANEL</option>  <option value='6.3"X2.8 EDGE PANEL '>6.3"X2.8 EDGE PANEL </option>  <option value='5.7"X1.9" EDGE PANEL'>5.7"X1.9" EDGE PANEL</option>  <option value='5.7"X2.84" EDGE PANEL'>5.7"X2.84" EDGE PANEL</option>  <option value="NAKED PANEL/PCB MOUNT">NAKED PANEL/PCB MOUNT</option>  <option value='6"X3.1" EDGE PANEL'>6"X3.1" EDGE PANEL</option>  <option value='6"X6"X3" SANITARY'>6"X6"X3" SANITARY</option>  <option value="VARIOUS SIZES & MOUNTING">VARIOUS SIZES & MOUNTING</option></select></div>
Copy after login


2) 这是其中一个复选列表
HTML code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><div id="fifth" class="selection_name">Outputs (Use ctrl+click to make multiple choices)</div><div id="fifth" class="selection_options">
<select name="outputs[]" size="6" multiple title="out puts">  <option value="NULL" selected> </option>  <option value="ANALOG 4-20mA/VDC">ANALOG 4-20mA/VDC</option>  <option value="RELAYS">RELAYS</option>  <option value="OPEN COLL. XTR">OPEN COLL. XTR</option>  <option value="IRDA">IRDA</option>  <option value="4-20mA CALIBRATOR">4-20mA CALIBRATOR</option>  <option value="WIRELESS ON REQUEST">WIRELESS ON REQUEST</option> </select><div class="clear">
                 
              
              
        
            </div>
</div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template