What is significance of method attribute of form?
In : BCA Subject : Web DesigningThe method attribute in an HTML <form> specifies how the form data is sent to the server.
The two primary methods are:
-
GET: Appends the form data to the URL (visible to everyone). Used for searches or filters where you might want to bookmark the result. -
POST: Sends the data inside the body of the HTTP request (not visible in the URL). Used for sensitive data like passwords or when submitting information that changes something on the server (e.g., making a purchase).