A php form is an area that contains form elements, and a form can be created by using the <form> tag and inserting related form elements into it. Here I will give you specific to analyze how the form is created.
Form elements are elements that allow users to enter information in a table consignments (such as a text field, drop-down list, radio box, check box, and so on).
The form is defined using the form label (<form>).
<form action= "script.php" method= "POST" > </form>
In the case of PHP, the most important attribute of the form tag is the action, which specifies which page the form data will be sent to, and the null is the page that contains the form, which is the current page;
The second property is method, which specifies how the data is sent to the processing page, and two options (get and Post) indicate the HTTP method to use.
Method Selection:
The Get method is to send the submitted data to the receiving page via a series of (name-value) pairs appended to the URL. For example:
Http://www.example.com/script.php?name=Homer&gender=M&age=35
Unfortunately, the amount of data transmitted through get is limited, and it is not very secure (because the data is visible).
Generally, get is used to request information, such as a specific record in a database or a search result (search almost always uses get).
Use the Post method when you need to take an action, such as when updating a database record or sending an e-mail message.
For these reasons, I generally use post, and if there are exceptions, I will say otherwise.
Now let's create a simple form, because this file does not contain PHP code, so my file is saved as (. html) suffix, of course, you can also use the (. php) suffix.
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
This form is ready, and the final one is as follows: