Php form processing, php form
I recently learned PHP by myself and just learned the form. Let's simply put it.
First, I used two software, PHPstudy and phpstorm.
The installation is also very simple. I will not talk about it here.
Step: 1. Open phpstudy
That's it,
2. Open the editor. I use phpstorm, because my phpstudy is saved on the E drive.
Therefore, I have created two files in the E: \ phpStudy \ PHPTutorial \ wwwdirectory, index.php and welcome.html.
The code for the two files is as follows:
Index. php
1 Welcome <? Php header ("Content-Type: text/html; charset = UTF-8"); 2 echo $ _ POST ["fname"] ;?>! <Br> 3. What is your age? Php echo $ _ POST ["age"];?> Years Old.
Welcome.html
1 <! DOCTYPE html> 2
Here we will talk about header ("Content-Type: text/html; charset = UTF-8"); this line of code is used to solve PHP Chinese garbled characters.
Take a look.
Click Submit,