When creating an HTML form, there are two methods for transmitting
the data entered by the user, the
POST method which
respectively transmit the data in the navigation bar and in the
The default method is the
GET method. The data will be visible
in the URL, for example:
The processing PHP page will receive data in a variable (an array) named
Some remarks and precautions:
<form action="process.php" method="get"> <!-- Form fields --> </form>
With the POST method, the form data is transmitted in the HTTP request. If
the site uses an SSL certificate (domain starting with
http), data will be encrypted. This method is more secure.
The processing page will receive data in the variable
<form action="process.php" method="post"> <!-- Form fields --> </form>
Modify the script in the following example so that the data is transmitted with the GET method. Check the URL of the processing page after form is submitted.