如何将正确的html选择值传递给$ _POST php

gan*_*jan 6 html php post select

我试过像这样的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>
Run Code Online (Sandbox Code Playgroud)

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

$_POST['select']
Run Code Online (Sandbox Code Playgroud)

Ily*_*sis 24

添加名称标签...

<select id="select" name="select" size="2 ">
Run Code Online (Sandbox Code Playgroud)