Re: [PHP] radio buttons in $_POST

2005-04-23 Thread M. Sokolewicz
Justin Gruenberg wrote: None And if you didn't want it to show to the user (because they have to make a choice anyway) . . . you can use this css: input[value="None"] { display: none; } You should then always have a value to play with in PHP, and the user doesn't see any extra clutter. wh

Re: [PHP] radio buttons in $_POST

2005-04-23 Thread Justin Gruenberg
> None And if you didn't want it to show to the user (because they have to make a choice anyway) . . . you can use this css: input[value="None"] { display: none; } You should then always have a value to play with in PHP, and the user doesn't see any extra clutter. -- PHP General Mailin

Re: [PHP] radio buttons in $_POST

2005-04-23 Thread Janet Valade
Ashley M. Kirchner wrote: I have this form.html: text input radio input1 radio input2 Then I have this script (form.php): $val) echo "$key = $val\n"; ?> If I simply submit the form empty, all I get back from the script is the text input $key. The radio button doesn't show up. Why

Re: [PHP] radio buttons in $_POST

2005-04-23 Thread M Saleh EG
That's because Radio Buttons and Check Boxes do not return anything if not checked or selected. So you gotta explicitly do it ur self. That is u gotta check for it's validity and non-empiness. e.g. in ur scenario if(!isset($_POST['radio_test'])) { //print out all the options unselected } else {

Re: [PHP] radio buttons in $_POST

2005-04-23 Thread Hegedűs Balázs
Hi, You solve the problem yourself: "the radio input does show up once one of the radios is checked". When it is unchecked is isn't set...if you need to assign it a value in any circumstances you should test it with for example (of course you may omit the ternary operator...isset() will do th

[PHP] radio buttons in $_POST

2005-04-23 Thread Ashley M. Kirchner
I have this form.html: text input radio input1 radio input2 Then I have this script (form.php): $val) echo "$key = $val\n"; ?> If I simply submit the form empty, all I get back from the script is the text input $key. The radio button doesn't show up. Why is that and how can I ha