What is the difference between GET and POST methods in an HTML form?

Both are values of the method attribute of a form.

PointGETPOST
Data goesIn the URLIn the body of the request
Visible to userYesNo
BookmarkPossibleNot possible
Size limitLimited by URL lengthMuch bigger
Use forSearch, filtersLogin, registration, file upload
<form action="search.php" method="get">...</form>
<form action="login.php" method="post">...</form>

Never send a password with GET, because it stays in the URL and the browser history. See HTML Forms.


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.