Jump to content


Photo

easy questions with radio button-forms but just cant figure it out *solved*


  • Please log in to reply
2 replies to this topic

#1 jwk811

jwk811
  • Members
  • PipPipPip
  • Advanced Member
  • 714 posts

Posted 02 October 2006 - 02:23 AM

How can I retrieve the data from a radio button in a form? I know how to get all the others but I just can't figure out how this works.. I tried <input type="radio" name="1" value="(the input)"> and tried to catch the data like this
<?php
$name = $_POST['1'];
?>
and should the value come up in the variable?
when i sent that data in an email it came up "on"... what does that mean, lol?

#2 jwk811

jwk811
  • Members
  • PipPipPip
  • Advanced Member
  • 714 posts

Posted 02 October 2006 - 02:51 AM

nevermind problem resolved.. it was the value thing but i just made a mistake with it

#3 Wintergreen

Wintergreen
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts

Posted 02 October 2006 - 02:56 AM

There is no input with a radio button, you assign individual values (normally numbers) and check the value of the radio button options based on the name assigned to that group of radio buttons. 




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users