Home > Web Front-end > HTML Tutorial > The value of name in the select drop-down box cannot be obtained in php100_html/css_WEB-ITnose

The value of name in the select drop-down box cannot be obtained in php100_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:07:51
Original
1038 people have browsed it

echo $_POST['f_id'];
?>





Reply to discussion (solution)

You didn’t write this together, did you? ? This only works if the form is submitted. Your form here has no action address and no submit button. How do you want it to be obtained?

<form action="test.php" method="post"><select name="f_id"><option value="0">添加大类</option><option value="1">添加小类</option></select><input type = "submit" value = "apply" /></form>
Copy after login


Write the php code into a separate php file. I added it to test.php here. Click the apply button and it will be submitted to test.php In the file, the value can be obtained.
Give it a try.

No, you should find a book first and read it carefully~~~

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