learningPHP1 Posted December 2, 2012 Share Posted December 2, 2012 Hello topic: radio optoin button Problem: when the page loads up both radio options are blank. if i select one and change my mind and select the other one they both become selected. what i lke to see if i select one the other one needs to unselected. <input id="id_radio1" type="radio" value= "check1" name="newClient" <?php if (!empty($_POST['newClient'])) { echo 'checked="checked"'; } ?> /> New Client <input id="id_radio2" type="radio" value= "check2" name="returningClient" <?php if (!empty($_POST['returningClient'])) { echo 'checked="checked"'; } ?> />Returning Client Any help you can give me would be greatly appreciated. thanks l Link to comment https://forums.phpfreaks.com/topic/271464-radio-options-selection-control/ Share on other sites More sharing options...
Christian F. Posted December 2, 2012 Share Posted December 2, 2012 Give them the same name. Link to comment https://forums.phpfreaks.com/topic/271464-radio-options-selection-control/#findComment-1396783 Share on other sites More sharing options...
learningPHP1 Posted December 2, 2012 Author Share Posted December 2, 2012 It worked.. Thanks Christian Link to comment https://forums.phpfreaks.com/topic/271464-radio-options-selection-control/#findComment-1396905 Share on other sites More sharing options...
Christian F. Posted December 2, 2012 Share Posted December 2, 2012 You're welcome. Link to comment https://forums.phpfreaks.com/topic/271464-radio-options-selection-control/#findComment-1396961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.