melo Posted March 17, 2013 Share Posted March 17, 2013 Can anyone help me on how can i call the value of radio button. I have this code: <input type='radio' name ="answers <?php echo $arMChoices['QuestionId']?>" value="True">True <input type='radio' name ="answers <?php echo $arMChoices['QuestionId']?>" value="False">False and i want to display the value of the radio button to another page. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/275757-call-the-value-of-radio-button/ Share on other sites More sharing options...
Tanja Posted March 17, 2013 Share Posted March 17, 2013 Values from database? I did it so: '<span class="radiotrenner"> <input type="radio" name="gender" value="male"'; if (($row['gender']) == 'male') echo 'checked="checked"'; echo '>male</span>', '<span class="radiotrenner"> <input type="radio" name="gender" value="female"'; if (($row['gender']) == 'female') echo 'checked="checked"'; echo '>female</span>', Quote Link to comment https://forums.phpfreaks.com/topic/275757-call-the-value-of-radio-button/#findComment-1419095 Share on other sites More sharing options...
melo Posted March 17, 2013 Author Share Posted March 17, 2013 Example. If the user choose TRUE and click SUBMIT then the word TRUE will display in another page. Quote Link to comment https://forums.phpfreaks.com/topic/275757-call-the-value-of-radio-button/#findComment-1419101 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.