【问题标题】:How to pass correct html select value to $_POST php如何将正确的 html 选择值传递给 $_POST php
【发布时间】:2011-05-24 10:29:39
【问题描述】:

我试过这样的html:

<form method="post">
   <select id="select" size="2 ">
        <option value="3">test</option>
        <option value="4">test2</option>                     
   </select>
   <button type="submit" value="execute">
</form>

如何在 post 数组中获得 3 或 4 的值

$_POST['select']

?

【问题讨论】:

    标签: php html select post


    【解决方案1】:

    添加名称标签...

    <select id="select" name="select" size="2 ">
    

    【讨论】:

      猜你喜欢
      • 2018-10-23
      • 1970-01-01
      • 2011-09-15
      • 2016-03-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多