SirChick Posted July 22, 2007 Share Posted July 22, 2007 I have 2 radio buttons in a group named Gender one being male and one being female, now how would i get the value from the user's choice out of the two radio buttons and assign it to an $Gender variable..? Quote Link to comment Share on other sites More sharing options...
dbo Posted July 22, 2007 Share Posted July 22, 2007 $gender = $_POST['radio_button_group_name_thing']; that is assuming your form uses the post method. Quote Link to comment Share on other sites More sharing options...
dbo Posted July 22, 2007 Share Posted July 22, 2007 Or hrmm... is it like checkboxes and returns "on"? I forget. Quote Link to comment Share on other sites More sharing options...
spode Posted July 22, 2007 Share Posted July 22, 2007 the result SHOULD be automaticaly assigned to the variable using $gender = $_POST['gender_thingy']; because i'm pretty sure it doesnt matter on the type of input, the result is just what is assigned to the variable Quote Link to comment Share on other sites More sharing options...
SirChick Posted July 22, 2007 Author Share Posted July 22, 2007 whats the 'gender_thingy' is that the group name ? 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.