Home  >  Article  >  Backend Development  >  php Get the value of the select drop-down list box_PHP tutorial

php Get the value of the select drop-down list box_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:38:081341browse

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

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

Copy code The code is as follows:

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





The value of name needs to be set. Otherwise it cannot be delivered.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321827.htmlTechArticleGive the select form a name. After submitting the form, use $_POST or $_GET to submit $_POST['sel'] or $_GET['sel'] to obtain the value of the selected select. Copy the code as follows: if...
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