Returns
checked="checked" string if the parameter value is TRUE.
Use the radio_state() function for programming
radio buttons. The following code creates two radio button elements for selecting a color.
<input name="color" <?= radio_state(post('color') == 'red') ?> value="red" type="checkbox"/>
<input name="color" <?= radio_state(post('color') == 'blue') ?> value="blue" type="checkbox"/>