PHP Form Empty Fields
Why
When form fields are empty, some data is not sent to the server. Sometimes the field is sent as an empty string; sometimes no field name is sent at all.
Action for empty fields
The following table illustrates the behavior of various form controls when they're not filled in or selected:
Form Control | What Happens When It's Not Filled In Or Selected |
---|---|
Text input field | The field name is sent, along with an empty value. |
Text area field | The field name is sent, along with an empty value. |
Password field | The field name is sent, along with an empty value. |
File select field | The field name is sent, along with an empty value. |
Hidden field | The field name is sent, along with an empty value. |
Checkbox field | Nothing is sent. |
Radio button field | Nothing is sent. |
Pull - down menu | A value is always sent. |
List box | Nothing is sent. |
Multi - select box | Nothing is sent. |
Submit button | Nothing is sent if the button isn't clicked. |
Image field | Nothing is sent if the button isn't clicked. |
Reset button | Nothing is sent. |
Push button | Nothing is sent. |