Validating radio button with php
Be aware of that any Java Script code can be added inside the - this would not be executed, because it would be saved as HTML escaped code, like this: <script>location.href(' The code is now safe to be displayed on a page or inside an e-mail.
These pages will show how to process PHP forms with security in mind.
It is also required to add server side form validation in your form processing script.
The value attributes of the input elements in the HTML form are the possible values that can be stored in the $_POST['consent'] array element when a radio button is selected.