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
$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;