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!