I normally name my db specific fields in my forms like this "objectname[columnname]", I tseems CI cant access these values using $this->input->post('objectname[columnname]'), what do I do? there is not a chance in hell im renaming 100+ form fields.. I am actually disliking CI, it really is getting in the way of progress by changing the de facto PHP norms...
A:
I seems I can rely on the $_POST var, but I thought this was reset?
bananarepub
2009-07-27 09:01:09
CI destroys the $_GET variable, not $_POST.
jimyi
2009-07-27 14:08:38
+7
A:
And were you using $_POST['objectname[columnname]']
or $_POST['objectname']['columnname']
?
Have you tried the equivalent for the latter
$obj = $this->input->post('objectname');
echo $obj['columnname'];
?
If it works, you can write you own helper to retreive that like post_val('objectname[columnname]')
.
streetpc
2009-07-27 09:02:55
A:
I just went with the $_POST['objectname']['colname'] option as i usually do even though this is probably not the CI way..
bananarepub
2009-07-27 10:46:28
It does work but its not the CI way and avoids all sorts of things like global XSS cleaning.
Phil Sturgeon
2009-12-17 15:25:54