PHP Post Get Method For Submit Form Data

php post get method
php post get method

In this tutorial, we are going to learn PHP post get method, the two ways we can submit the form data.A form has an attribute called method defines the way you send data to the PHP script.Form Method has two values, one is a post and another one is a get. So let see, how PHP post get method is used for form submission.

PHP Post Get Method

This two method have their own advantages as well as disadvantages.First, we look at the POST Method.

PHP POST METHOD:

  • PHP POST method is highly secure because when we submit the form the values of the form is not viewable.
  • PHP POST method provides a $_POST associative array to get all the submitted information.
  • PHP POST method does not have any restriction on data size when form submitted.

Let see an example of PHP POST METHOD:

PHP GET METHOD:

  • PHP GET method is not secure because when we submit the form the values of the form is viewable on URL.
  • PHP GET method provides a $_GET associative array to get all the submitted information.
  • PHP GET method can not send image data when form submitted.
  • PHP GET method can be used to send sensitive data
  • PHP GET method data visible on URL like this.

Let see an example of PHP GET METHOD:

Conclusion:

This is how we can use PHP POST method and PHP GET method to send the data from client side to a web server.

If you any query related to this post feel free to comment on the comment box.Do not to forget to hit share button because some else also need this.  Also, like our Facebook Page.

Also Read:

 

11 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *