Home  >  Article  >  Backend Development  >  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
WBOYOriginal
2016-07-13 10:58:381359browse

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