Usage of the text box: < input type="text" name="username" /> The input types include text, password and other types. HTML5 has added many new input types. If you want to learn this kind of knowledge, you can have a good understanding of it, because it is divided into"/> Usage of the text box: < input type="text" name="username" /> The input types include text, password and other types. HTML5 has added many new input types. If you want to learn this kind of knowledge, you can have a good understanding of it, because it is divided into">

Home  >  Article  >  Backend Development  >  Website program development PHP program development example learning form to obtain the value of the text box

Website program development PHP program development example learning form to obtain the value of the text box

WBOY
WBOYOriginal
2016-07-29 08:46:321048browse


 Usage of text box:
 
 The input types include text, password and other types. HTML5 has added a lot of new input types. If you want to learn this kind of knowledge, you can have a good understanding of it, because the more detailed it is, the easier it is to use.
Look at the functions of this example

 PHP程序开发范例学习之表单 获取文本框的值

After filling in the form and submitting it:

 PHP程序开发范例学习之表单 获取文本框的值
Implementation code:

Copy the code The code is as follows:





< td width="114" height="30" align="center" >Admin:




< td height="30" align="center">





< ;/form>
Password:

if(!isset($_POST['submit']))
return ;
if($_POST['submit']=='submit'){
$username = $_POST['username'];
$password = $_POST['password'];
}
echo <<



< tr>


Administrator:$username
Password: $password

EOT;
?>


Use isset() function to determine whether $_POST['submit'] is set

The above introduces the website program development PHP program development example learning form to obtain the value of the text box, including the content of website program development. I hope it will be helpful to friends who are interested in PHP tutorials.

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