HTML forms interact with PHP for data

Source: Internet
Author: User
Tags configuration php php server php development environment
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.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.