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-pretty-simple-form-2-inputs.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 inputs, and then hit Enter. If the form was submitted, you'll see a question mark with the start of the query string, like "?topping=...".

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 does not submit. I don't see the REQUEST_URI change. I didn't expect this, because the simpler demo with only one form input worked.