Hey all, I have something weird happening here. In a module I have developed, I have a Form posting a series of checkboxes to $_POST as an array.. ie:
$r .= $DSP->input_checkbox("groups[]", $row['id'] , $selected ).NBS.$row['cat_name'];
as you can see the checkboxes are posting as an array The output $POST array contains the groups array pefectly like this:
groups[] => array([0]=>123, [1]=>456, [2]=>789)
thats perfect, but for some reason it is also appending , and auto-incrementing it seems, separate values at the end of the $_POST array like so:
[groups_0]=>123 [groups_1]=>456 [groups_2]=> 789
which is weird.
The function is fairly simple, so i wont post it here, ive looked at the 3 lines very closely and no, theres nothing that could be adding to $POST like that.
Im wondering if its a bug or maybe something that is supposed to happen when using $DSP->input_checkbox?
A few months on an ANOTHER module, and I am getting the same issue.
Simple form data, to post into an array within $_POST. I have say, a very simple form:
<input type="text" name="1[this]" value="xx"/>
<input type="text" name="1[that]" value="yy"/>
$_POST on the processing page will look like:
[1] => array([this] => xx, [that] => yy), [1_this] => xx, [1_that] => yy
Those last two variables SHOULDNT be there,
Does anyone think this could be a server issue (im using MAMP), such as an apache module messing with $_POST? or heaven forbid missed EE setting.. or worst case, EE bug?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.