Home > php教程 > php手册 > body text

php 如何取得select下拉列表框的值

WBOY
Release: 2016-06-13 09:58:14
Original
935 people have browsed it

php教程 如何取得select下拉列表框的值
 
 给select 表单无素一个名字。
 表单提交后 用 $_POST 或 $_GET 方式提交
 
 $_POST['sel']或者$_GET['sel']获得选中的select的value值

if( $_POST )
{
 echo $_POST['select'];
}
?>


 
 

需要设置name的值。否则无法传递。

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template