Home  >  Article  >  Backend Development  >  php 获取select下拉列表框的值_PHP

php 获取select下拉列表框的值_PHP

WBOY
WBOYOriginal
2016-06-01 12:18:13940browse

给select 表单无素一个名字。
表单提交后 用 $_POST 或 $_GET 方式提交

$_POST['sel']或者$_GET['sel']获得选中的select的value值
复制代码 代码如下:
if( $_POST )
{
echo $_POST['select'];
}
?>






需要设置name的值。否则无法传递。
Statement:
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