I am having a bit of trouble with my form and radio buttons, with input text I do this:
<?php echo form_input('lastname', set_value('lastname'), 'id=lastname'); ?>
<?php echo form_error('lastname'); ?>
and when the validation runs and that input field that is filled out gets the valued returned...what I am looking for is a way to do this with radio buttons
<tr><td><?php echo form_label('Gender: ', 'gender'); ?></td><td><?php echo form_label('Male', 'male') . form_radio('gender', 'M', '', 'id=male'); ?><br><?php echo form_label('Female', 'female') . form_radio('gender', 'F', '', 'id=female'); ?></td><td><?php echo form_error('gender'); ?></td></tr>
as you can see both my radio buttons have values already F or M.....how do I have the button that is selected returned selected?