There is a checkbox, visually it is disabled (the check mark is removed), but HTML it is as follows:
& lt; input type = "checkbox" name = "type_edit []" value = "1" checked = "checked" & gt ;
Taco handler:
if ($ this- & gt; input- & gt; post ('type_edit')) {
Foreach ($ this- & gt; Input- & gt; post ('type_edit') AS $ Val) {
$ Data [] = $ VAL;
}
VAR_DUMP ($ DATA); DIE (); // nothing displays
} // does not enter this condition
Why so?
Answer 1, Authority 100%
visually it is disabled (check mark)
Well then, in fact, the question? Tick to get $ _ post ['type_edit']
not empty (or rather to get it at all)
If Checkbox is not marked (check), then in the form it is not transmitted
Answer 2
Try the following code:
$ result = array ();
Foreach ($ _ post ['type_edit'] AS $ DATA)
$ result [] = $ DATA;
Print_R ($ Result);
If something displays, then the problem with
$ this- & gt; input- & gt; post ('type_edit')
Answer 3
Why the attribute of Checked something to assign something. Try simply:
& lt; input type = "checkbox" name = "type_edit []" value = "1" Checked & gt;