There exist two methods in PHP to collect data submitted in a FORM. PHP GET Method and PHP POST Method. In the PHP POST method, data from HTML FORM is submitted/collected using a super global variable $_POST. This method sends the encoded
information embedded in the body of the HTTP request and hence the data is not visible in the page URL unlike the GET Method. Some of the advantages of using the POST Method are: Some of the disadvantages of using this method are: Although both GET and POST methods are used to collect/submit form data, their methods exhibit some differences and are hence used according to need. Some of the main differences between them are: Data Security Not Secure Secure Data Limit 2048 Characters No Limit Performance Good Slower Data In URL Visible Not Visible Data Types Only String Data Types String, binary, numeric, etc. Cacheable Yes No To understand how $_POST collects data, create a simple FORM with two fields - Name and Age, and collect and display that data using the POST Method. Advantages of Using POST Method
Disadvantages of Using POST Method
Difference Between PHP GET and POST Method
Method
GET
POST
Example of POST Method Code