How to retain value of a radio button
Posted: Wed Oct 14, 2009 12:18 am
How can code a radio button such that it retains it's value (checked) after a unsuccessful form post?
Here's how setup a a text field to retain value. I figure for radios, it should be too far off.
Here's how setup a a text field to retain value. I figure for radios, it should be too far off.
Code: Select all
<input class=clp type="text" name="exname" maxlength="50" size="40" value="<?php echo isset($exname) ? $exname : ''; ?>" />Code: Select all
<input type="radio" name="extype" value="1">
<input type="radio" name="extype" value="2">
<input type="radio" name="extype" value="3">