View Full Version : how to auto check the radio button???

06-28-2005, 06: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, 06:29 AM
By using the checked property:

<input type="radio" name="foo" checked>

06-28-2005, 06:31 AM

<input type="checkbox" name="male" <?= $person['male']?'checked':'': ?> >


06-28-2005, 03:20 PM
XHTML Compliant:

<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

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum