Insert a php form to a Web page

Source: Internet
Author: User
Tags php form
Insert a form into a common WEB page as follows: a complete form is created to display all the elements and attributes in & lt; form & gt. Insert a form into a common WEB page as follows: a complete form is created here

Note: This form includes common form elements: single-line text box, multi-line text box, single-option (radio), multi-option (checkbox), and multiple-choice menu.

Maxlength is an attribute associated with the name and password text box. it limits the maximum length of a password to 100 characters.

A list box is a list menu with its own values under its naming attributes. Selected is a specific attribute selection element. If an option is attached with this attribute, this attribute is listed as the first item during display.

The content in the intro text box displays text, row, and column width according to rows and cols.

The checked tag refers to a value in a single option and multiple options. it is selected by default.

Save the fileIndex. phpPage.

The form in the above file uses the POST method to transmit data, so the data submitted by the user is saved to the Super global array of $ _ POST or $ _ REQUEST, we can process submitted data based on the value in the $ _ POST array. Later, we will introduce in detail the method for obtaining form data. The POST method is one of them, and select in method = "post. When obtaining form data, forms are the most basic operations in applications. Therefore, please pay attention to the course introduction after the forms.

Note: Because the PHP script is not used for this page, the web page is a static page. you can save it as. html and open the file in a browser to view the running result.

Enter the address in the browser and press Enter. the running result is as follows:

How is it? Does it look a little more appealing to the senses. You can try it by yourself.

The above is the detailed content of the php form inserted into the Web page. For more information, see other related articles in the first PHP community!

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.