[thelist] Strange checkbox issue (PHP / Forms)
Lee Kowalkowski
lee.kowalkowski at googlemail.com
Wed Mar 4 05:59:55 CST 2009
2009/3/4 Hugh Miller <hmiller at cfpress.co.uk>:
> I have a very strange PHP problem processing checkboxes.
>
> <input type="checkbox" name="subsection[]" value="1" /> One
> <input type="checkbox" name="subsection[]" value="2" /> Two
> <input type="checkbox" name="subsection[]" value="3" /> Three
> <input type="checkbox" name="subsection[]" value="4" /> Four
>
I've never put square brackets in shared names, but it looks like
loads of people do, perhaps PHP does some 'magic' so you don't have to
include the square brackets when referring to those fields. The
example given in the HTML spec doesn't use square brackets
(http://www.w3.org/TR/html401/interact/forms.html#h-17.10).
--
Lee
More information about the thelist
mailing list