+ 3
Someone should please explain the GET and POST method in html forms
2 Antworten
+ 4
GET and POST method used as a method for sending data from client to server or vice versa.
POST mostly used to send sensitive data such password and email.
0
To extend JFS nice and short explanation. When you use the GET method in an HTML form the content of your variables will be stored in the URL. Some points to consider when using GET
- Security: Everybody sees exactly what Data was send. In addition, no encription is possible.
- Data limit: There is a hard cap of how much data can be send.
+ Repeatability: The user can copy, share, bookmark and do whatever he wants with the page and the form data will be kept.
When you are choosing to use POST or GET always prefer POST. Use GET only when you need it for the specific use case in your application.
Like using a GET transmitted ID for showing a profile page.