Re: $_POST variable

From: Date: Sun, 13 Mar 2011 01:26:59 +0000
Subject: Re: $_POST variable
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-311821@lists.php.net to get a copy of this message
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/

« previous php.general (#311821) next »