searls03 Posted April 28, 2011 Share Posted April 28, 2011 how do you make it so that a radio button is either checked or unchecked based on database? Quote Link to comment https://forums.phpfreaks.com/topic/234984-echo-radio-button/ Share on other sites More sharing options...
JKG Posted April 28, 2011 Share Posted April 28, 2011 <input type="radio" name="group1" value="Milk" <?php if($row['column'] == 'Milk'){echo 'checked';}?>> Milk<br> or <input type="radio" name="group1" value="Milk" <?php if(isset($row['column'])){echo 'checked';}?>> Milk<br> Quote Link to comment https://forums.phpfreaks.com/topic/234984-echo-radio-button/#findComment-1207614 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.