Page 1 of 1

radio buttons

Posted: Fri Oct 14, 2005 1:22 am
by phoenix121
if i make a form with radio buttons and the user clicks submit, do i use the value of the radio button in the POST superglobal variable?

eg.

Code: Select all

<input type="radio" name="gender" value="male">Male<br>
<input type="radio" name="gender" value="female">Female
should i use $_POST['male'] or $_POST['female']or some other way of notation?

Posted: Fri Oct 14, 2005 6:00 am
by thomas777neo
Well, you would use $_POST['gender'] to get the value sent.