I most certainly feel when you are not in a dynamic environment and security is your major concern your 1st choice should be POST Request. Rest GET takes you of out of a lot of tight spots like ajax and similar stuff that require continues requests up and down the client and server.
Simple formula: GET - Read-only content requests (Fetch) POST - Updating content on your server (Update) Mostly because POST can handle longer content-lengths and files via multipart, whereas GET requests are fully visible in the user's address bar.
Then which is mostly used in programming GET or POST? Also which is always better to use? please guide!
There's no "always" or "better" - they're 2 different request methods with different uses. You can't use GET to upload a file for instance - and you can't use POST if you want URLs with parameters.
Good explainasion from Wogan, i would just like to add, POST offers better privacy for the user, while GET is more secure for the server. If a user uploads a binary file like a picture, you will need to use POST, if the form contains private information like a persons real name, address etc. i would use POST so the data isn't in the url and can be seen by others, and i would use GET for allmost anything else, with GET a user can't upload a binary virus correctly forexample.
Quite simply, If the submission is reading data, without making any changes, use GET. If your submission will be making changes, or causing side-effects, use POST. For example, when doing a query, such as a Google search, the form should use GET. If you are creating a new account with Yahoo! mail, the form should use POST. The Google search is reading data and new account in Yahoo! mail is changing things.
I use get method when i do no want to send username, passwords or logging in data. Get method can not be used to send images in php. Post method is used for it.