Re: $_POST variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 6:07 PM -0600 3/12/11, Shawn McKenzie wrote:
On 03/12/2011 10:37 AM, tedd wrote:
 > Here's a demo:

 > http://php1.net/b/form-radio1/

 > Don't make it more complicated than it needs be.

My point exactly!  So long as the name of the name[] part is the same
they will be treated as the same "group" of radio buttons.

So here is the long and short; if the name is the same and you specify
an index then names with the same index will be grouped together:
name[1] and name[1] are the same but different group from name[2].  If
you don't specify an index, but the name is the same, then they are
grouped together:  name[], name[].

By grouped together I mean that only one of the group can be selected
and therefore successful on submit.

--
Thanks!
-Shawn


Yeah, that's clear as mud -- I know how to do it and that confused me. :-\

Here's a much simpler example than my previous one:

http://rebel.lcc.edu/sperlt/citw229/sticky-radio.php

You don't even need an array. Just check the "choice" variable.

Cheers,

tedd

--
-------
http://sperling.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux