What are the form method Attribute available for submitting?

The method attribute of the HTML <form> tag tells how the form data is sent to the server. There are two values: GET and POST. If you write nothing, the default is GET.

<form method="get" action="search.php">
    <!-- fields -->
</form>

<form method="post" action="login.php">
    <!-- fields -->
</form>
GETPOST
Data goes in the URL (visible)Data goes in the request body (not in the URL)
PHP reads it from $_GETPHP reads it from $_POST
Use for search and filtersUse for login, registration and changes

The details are in difference between GET and POST and PHP Forms Handling.


Learn more about the similar topics:
Tutorials
PHP Forms Handling
PHP Send Mail
PHP header() Function
PHP mail() Function
Exercises & Assignments
Create a PHP Form with 2 fields Name and Hobbies
Interview Questions & Answers
What are the form method Attribute available for submitting?
How can we submit a form without a submit button?
What is the difference between GET and POST method in PHP?
How to redirect a page in PHP?
How to get the browser details of a visitor in PHP?
How to get the previous page (referrer) URL in PHP?
How to get the IP address of a visitor in PHP?