https://dev.webpages.dk/  
 
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

 Radio

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
webdev
photo

 HTML

<HTML><BODY> 
<FORM METHOD='POST' ACTION=''> 
<INPUT TYPE='radio' NAME='page' VALUE='webdev'> webdev
<INPUT TYPE='radio' NAME='page' VALUE='photo'> photo
<INPUT TYPE='submit'>
</FORM> </BODY></HTML>

 PHP

<?php
    if ($_POST['page'] == "webdev") { 
        header('location:http://dev.webpages.dk/'); 
    } elseif ($_POST["page"] == "photo") { 
        header('location:http://photos.webpages.dk/'); 
    } 
 ?>
Icons made by Freepik from www.flaticon.com This page shows you how you can find out which RADIO button in a group was selected.
07:20:49