php 获取文本框中值的实现代码

WBOY
Release: 2016-07-25 08:56:26
Original
2440 people have browsed it
复制代码

文本框的用法:

复制代码

其中input类型包括text、password等类型。    填入表单提交后:

  1. 管理员:
    密 码:
  2. if(!isset($_POST['submit']))
  3. return ;
  4. if($_POST['submit']=='submit'){
  5. $username = $_POST['username'];
  6. $password = $_POST['password'];
  7. }
  8. echo
  9. 管理员:$username
    密码:$password
  10. EOT;
  11. ?>
复制代码

使用 isset()函数判断$_POST['submit']是否被设置。



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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!