Home > Backend Development > PHP Tutorial > How to get the value of select drop-down list box in php_PHP tutorial

How to get the value of select drop-down list box in php_PHP tutorial

WBOY
Release: 2016-07-13 10:58:38
Original
1375 people have browsed it

php tutorial how to get the value of the select drop-down list box

Give the select form element a name.
After submitting the form, use $_POST or $_GET to submit

$_POST['sel'] or $_GET['sel'] gets the value of the selected select

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




You need to set the value of name. Otherwise it cannot be delivered.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631997.htmlTechArticlephp tutorial how to get the value of the select drop-down list box and give the select form element a name. After the form is submitted, use $_POST or $_GET to submit $_POST['sel'] or $_GET['sel'] to get the selected...
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template