Other demos in this series (for more details, go to my blog post):
  1. Test a form without attributes and the single input is not named.
  2. Test a form without attributes and the single input is named.
  3. Test a form without attributes and two named inputs - does not work!
  4. Test a form without attributes and two named inputs with a submit button - that fixes it!
  5. Test a form with "action" set to empty string (""), method is "POST", and the input is named.
  6. Test several different forms mixed with query strings in the "action"
This is what the server sees:

REQUEST_URI was /test-post-simplest-form.php

POST was Array ( )

GET was Array ( )


This form has no button, nor attributes (method and action are empty). Its tag is very simple:

<form>
You can verify this by viewing the source of this page.

Is it possible to submit the form using the Enter key? Try typing some text into the input, and then hit Enter. If the form was submitted, you'll see a question mark at the end of the URL (this does not happen in Firefox - instead, Firefox submits the form and empties out your input).

This page was created in November 2019. I tested it in Chrome. If I type in some text, and hit the Enter key, the form submits, but no data is transferred to the server - the $_GET and $_POST variables are empty. So the form submits, but is not useful.