HTML generally in the foreground page with the user to interact with the background can use PHP to build a server, to achieve data processing. Now let's use the foreground form to get the user input, and then return the information to the user after the PHP is spooled.
(1) Need to build PHP environment and server, please refer to my first three blog "How to install Mac XAMPP" "Eclipse Configuration PHP Development environment", "The first PHP program--hello world."
(2) The PHP code is implemented as follows:
Password: ". $_get[' password ');
(3) Get the link address of the PHP server, which is the link address after you run the program, such as my: http://localhost/MyPHPServer/Server.php
Wait for PHP to be accessed in HTML.
(4) The HTML form code is implemented as follows:
Form interacts with PHP
(5) then run the HTML code, enter the user name and password.
。
(6) Then jumps to another page, the information is the data returned by PHP:
。
(7) In this way, the HTML communication with PHP succeeds. We can see that we use get to communicate, we can also use post to communicate, as long as the HTML and PHP in addition to modify.
The above describes the HTML form and PHP to interact with the data, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.