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 Quote Link to comment Share on other sites More sharing options...
Christian F. Posted December 2, 2012 Share Posted December 2, 2012 Give them the same name. Quote Link to comment Share on other sites More sharing options...
learningPHP1 Posted December 2, 2012 Author Share Posted December 2, 2012 It worked.. Thanks Christian Quote Link to comment Share on other sites More sharing options...
Christian F. Posted December 2, 2012 Share Posted December 2, 2012 You're welcome. Quote Link to comment 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.