PHP How to Use Radio buttons
PHP How to Use Radio buttons:

Radio buttons are used when you give your user some choices, where there can only be one, a single, selection.

Be sure to try the working example to the right of here.
If you need the option of having your users make more than one selection. Then you should use checkboxes


How do you Use Radio buttons?

Here is shown two radio buttons and one submit button.
At submit the PHP code will check if one or the other was chosen, and then send your user to a page depending on the choice.

Call the page in your browser. You should see the radio buttons and the submit button. Make a choice and click on the submit. You are now sent either to the Web Dev frontpage, or the frontpage of the gallerys site.

Radio buttons


<INPUT TYPE='radio' NAME='page' VALUE='webdev'> webdev
<INPUT TYPE='radio' NAME='page' VALUE='photo'> photo
<INPUT TYPE='submit'>


    if ($_POST['page'] == "webdev") { 
    } elseif ($_POST["page"] == "photo") { 
Icons made by Freepik from This page shows you how you can find out which RADIO button in a group was selected.