View Full Version : how to auto check the radio button???
06-28-2005, 07:25 AM
i have made a edit section for the members where the every text field is filled by fetching the respective data and i m not able to check the one of the radio button field ie male or female......Please tell me how to check the one...
06-28-2005, 07:29 AM
By using the checked property:
<input type="radio" name="foo" checked>
06-28-2005, 07:31 AM
<input type="checkbox" name="male" <?= $person['male']?'checked':'': ?> >
06-28-2005, 04:20 PM
<input type="radio" name="gender" value="male"<?php !empty($info['male']) ? ' checked = "checked"' : '';?> />
Oh yeah, $info contains the variables you need. I'm not sure what you use, but I think you get the jist of it
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.