# Show radio buttons help

**URL:** <https://forum.kirupa.com/t/show-radio-buttons-help/234751>\
**Category:** programming\
**Created:** [August 5, 2007, 7:16pm UTC](https://forum.kirupa.com/t/show-radio-buttons-help/234751 "2007-08-05T19:16:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Utech22](https://avatars.discourse-cdn.com/v4/letter/u/f17d59/32.png) [@Utech22](https://forum.kirupa.com/u/Utech22)\
**Post date:** [August 5, 2007, 7:16pm UTC](https://forum.kirupa.com/t/show-radio-buttons-help/234751/1 "2007-08-05T19:16:29Z")

</div>

I have a radio button, that I want to use to show 2 others radio buttons, base on the radio option that the user selects;

This is what I have:

```php

<?php 
$employeeArray = array('Employed','Unemployed');//define array
 
   if ( ($_POST['estatus']) && $employeeArray[0] )//check condition
   {
##-------DISPLAY RADIO BUTTONS----------------------##
?> 
   <label>Employee: <input type="text" name="employee" maxlength="30" value="<?php echo $employee; ?>" /></label><br />         
  <label>Status: <?php
   foreach( $statusArray as $statusName )
   {
                     ?>   
                     <input type="radio" name="status" value="<?php echo $statusName; ?>" />
                     <?php echo $statusName; ?></label>
                     <?php 
    }
              ?>           
              <br /><br />
  <?php
         }else{}
  ?>

```

When the user selects the ‘employed’ radio button the ‘Employee’ and ‘Status’ radio buttons should be display. else if ‘unemployed’ radio button is selected don’t show the other radio buttons;
