These inputs will be validated to ensure, for example, that the user has entered their name. This is because collectively the radio buttons should be treated as a group (the user should select either 0, or 1, or 2, etc.). Its value is presented as its label, and clicking on it will trigger the form submission.
To determine whether the form has been submitted by the user, either check the request method (an example follows in the next section) or check for the presence of a specific form control (usually the submit button).
So far, we have a largely HTML page which defines the form; the only PHP so far is to specify the form’s action value.
We need to add code which will pick up the form data and allow us to check it and create error messages if needed.
Also each browser has a slightly different default behaviour.
The simplest change you can make to your forms is to mark a text input field as 'required': This informs the (HTML5-aware) web browser that the field is to be considered mandatory.