开发者

How to pass correct html select value to $_POST php

开发者 https://www.devze.com 2023-01-30 10:13 出处:网络
I have tried html like this: <form method=\"post\"> <select id=\"select\" size=\"2 \"> <option value=\"3\">test</option>

I have tried html like this:

<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>

How do I get a 3 or 4 value in the post array

$_POST['select']
开发者_如何学运维

?


Add the name tag...

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

精彩评论

暂无评论...
验证码 换一张
取 消