``POST`` Form Submission ======================== Data submitted by ``GET`` requests is less secure, because the URLs and the query parameters are saved in the browser's history. This makes sensitive data easy to find. Instead of using ``GET`` to submit form data, we should use ``POST``. Data submitted with ``POST`` gets sent in the body of the HTTP request. This prevents the data from appearing in the address bar of the browser. To submit using a ``POST`` request, we need to add the ``method`` attribute inside the ``
#. Save the change, then refresh the page in your browser. Make sure you see a URL in the address bar *without* any query string. If one appears after the refresh, just delete that part of the address and hit *Enter*. #. Type in some characters into the *Password* field, then click *Login*. #. Properly done, the URL in the address bar no longer spoils your secrecy! .. _send-data-to-server: Send Data to a Server --------------------- The ``method`` attribute lets us choose the type of request to make when our form gets submitted. However, our code still doesn't send the data anywhere. Let's fix this. The ``action`` attribute allows us to choose where the form request will be sent. Usually, the value assigned to ``action`` is the address of the target server. .. sourcecode:: html