What are the creation of PHP forms and forms

Source: Internet
Author: User
describe what forms are

The function of Web Forms is to let the browser and the website have an interactive platform. Web Forms are primarily used to send data to the server in a Web page, for example, to use forms when submitting registration information. When the user completes the submission (submit) operation, the content of the form is transferred from the client's browser to the server side, and after the PHP program on the server is processed, the information needed by the user is passed back to the client's browser. By getting a variety of information submitted by users, PHP interacts with Web forms.

Since the mention of web development, we have to mention that html,html as a Web user front-end Interface design standard language, is the developer must understand and skilled application, especially the HTML form part, it is particularly important.

Forms and HTML Markup language

HTML is the world's universal Hypertext Markup Language, through HTML can be used to achieve pictures, links, music and programs and many other elements. It's a basic skill that programmers must have now.

Forms are the most commonly used component of web domain applications, composed of submit buttons and other related components, and forms are used in many areas for user registration, login, online shopping, banking, and more.

Create a form

You can create a form by using the <form> tag and inserting the relevant form information in it. The structure of the form is the following form:

<form name= "Form_name"  method= "method" action= "url" enctype= "value" target= "Target_win" >             //Insert some form elements <form>

The <form> tag attributes are as follows:

<form> Tag Properties Description
Name Name of the form
Method Set how forms are submitted, get or Post methods
Action A URL (relative or absolute) that points to the page that processes the form
Enctype Set the encoding for the contents of the form
Target Sets the display of the return information, which is described below the property value of target

The property values for target are as follows:

Property value Description
_blank Displays the return information in a new window
_parent Displays the return information in the parent window
_self Displays the return information in the current window
_top Displays the return information in the top-level window

Description: The GET () method is to append the contents of the form to the URL address, post () by sending the information in the form as a block of data to the handler on the server, and not displaying the submitted information in the browser's address bar. The method property defaults to get ().

For example: Create a form and submit it to the data processing page check.php with the Post () method, which shows the following code:

<form name= "Form1"  method= "post" action= "check.php" >             //Insert some table cell elements <form>

Description: The <form> tag attribute in the code above is the most basic way to use it. It is important to note that when you use the form form, you must specify its Behavior property action, which specifies that the form will send the content to be processed when it is submitted.

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.