What is PHP form creation and form

Tell us what is the form

 

WEB form and function is to allow visitors to the site has an interactive platform. WEB form is mainly used to transmit data in a Web page to a server, for example, need to submit a form when the registration information. When you do submit (submit) operation after the user fill out information about upcoming contents of the form from the client browser to the server, after processing through the PHP program on the server, the information then needed by the user back to the client browser on. By obtaining a variety of information submitted by the user, and the PHP WEB form to achieve the interaction.

As mentioned Web development, I would have to mention HTML, standard HTML language as a Web front-end user interface design, is that developers must understand and skilled applications, especially HTML forms part, is particularly important. Shenzhen marble platform

Forms and HTML markup language

HTML is the world-wide HTML, you can achieve pictures, links, music, and so a variety of program elements by HTML. Now it is the programmer must have a basic skill.

WEB applications form is the most commonly used components, the submit button, and other related components, forms have applications in many fields, used to implement user registration, login, online shopping, banking and more.

Creating forms

Use <form> tag, and insert the relevant form information, to create a form. Form configuration is the following form:

1

2

3

<form name= "form_name"  method="method" action="url" enctype="value" target="target_win">

             // 插入一些表单元素

<form>

<Form> tag attributes are as follows:

<Form> tag attributes Explanation
name The name of the form
method Set submission, GET or POST form
action URL (absolute or relative path path) points to process the form page
enctype Set form content encoding
target Return set up the display information, the attribute value of the target will be described below

Attribute value of the target as follows:

Property Value Explanation
_blank The return information is displayed in a new window
_parent The returned information is displayed in the parent window
_self The return information is displayed in the current window
_top The return information is displayed in the top window

Description: GET () method is to form contents of the additional transmitted to the URL address; the POST () method is a form information as a data block transmitted to the handler on the server in the address bar of the browser is not displayed, filed information. The method attribute default method is GET ().

For example: to create a form to submit to the POST data manipulation page check.php () method, the code is shown below:

1

2

3

<form name= "form1"  method="post" action="check.php" >

             // 插入一些表单元素

<form>

Note: The above code <form> tag is the most basic attributes of use. Note that, when using the form form, you must specify its behavioral properties action, which specifies the content when submitting the form sent to the co-processing.

Guess you like

Origin www.cnblogs.com/furuihua/p/12125662.html