Validating radio button with php affair online dating
However, in the example above, all input fields are optional.
states that after submission form data will be handled by the PHP script present in this file only.
Form security (preventing exploits like SQL injection, XSS attacks etc ) are to be handled in addition to form validation.
Form validation is focussed towards the user input where as the security validations should be focused on how you use the data.
If the REQUEST_METHOD is POST, then the form has been submitted - and it should be validated.
If it has not been submitted, skip the validation and display a blank form.
Search for validating radio button with php:
You may opt for sending form data to a different file.