What are the differences between Get and post methods in form submitting?

I want to know what are the differences between Get and post methods in form submitting?

I had face this question in my interview but was not aware about the difference,

please help me.

Think Pull (GET) and Push (POST) :wink:

Get uses the querystring to pass values, where as Post uses form fields.

Thanks, it sounds very easy… :slight_smile:

You will get this a LOT when going on interviews. The answer is fairly simple though. POST and GET are two types of request methods for data. You use them for grabbing form data from a previous page for example.

What employers also want to hear is when to use one over the other. You would want to use POST when you need to hide data from the URL, for security purposes. You wouldn’t want to use GET if a customer is registering or purchasing an item would you? Now, GET would be used when you want your user to be able to easily access parts of your website, like search pages, or product pages, and they can easily be bookmarked. GET uses query strings (variables that have key/value pairs on your URL).