php - How do you echo out radio input types? -
i have html form echos text , radio inputs. form waits values filled before echoing them out.
here example of text input:
<input type='text' name='occ3' size='20' value="<?php echo $occ3; ?>"/> here radio output:
<input type='radio' name='o2' value='yes'>yes <input type='radio' name='o2' value='no'>no how output selected radio after user submits information? please help
if want radio buttons default submitted, can do:
$o2 = $_request['o2']; ?> <input type='radio' name='o2' value='yes' <?php if($o2 == 'yes') echo 'checked' ?> >yes <input type='radio' name='o2' value='no' <?php if($o2 == 'no') echo 'checked' ?> >no
Comments
Post a Comment