Get to know the Post and Get Methods in PHP
The post and get methods are two types of methods that are often used on an html form, both of which have their advantages and disadvantages depending on the needs in which a process will use, generally these two methods are placed in the script form as below:
form with post method
or
form method get
php get and post method
post method
this method will not display variables that are sent for processing on the next page and are usually often used on registration forms, here is an example of using the post method Submit Data
methodpost form
and here is the syntax to read the variable passed through the post method
processpost.php
get method
this method can often be used on search forms where the submitted variable will be displayed in the browser url such as a google search, this type is very necessary for pagination, the following is an example of the syntax for using the get method Submit Data
formget.php
and the following syntax is used to read the data sent via the get method:
processget.php
For more details, you might be interested in watching the use of the post and get methods in more detail via the following url
That’s a short article about the post and get methods in PHP, hopefully it’s useful for those of you who are just learning PHP