转换为codeigniter输入帖子?

When creating my permissions I have to methods, permission/access and permission/modify.

But I am wanting to use codeigniter input post method but not sure on correct method for adding two parts like below.

How can I convert the $this->request->post['permission']['access'] and $this->request->post['permission']['modify'] to codeigniter way

if (isset($this->request->post['permission']['access'])) {
$data['access'] = $this->request->post['permission']['access'];
} elseif (isset($user_group_info['permission']['access'])) {
$data['access'] = $user_group_info['permission']['access'];
} else {
$data['access'] = array();
}

if (isset($this->request->post['permission']['modify'])) {
$data['modify'] = $this->request->post['permission']['modify'];
} elseif (isset($user_group_info['permission']['modify'])) {
$data['modify'] = $user_group_info['permission']['modify'];
} else {
$data['modify'] = array();
}

Are you sure this is how your form is sending the post data, i mean in multi dimentional array? and i usually use

 $this->input->post('postedValue');

Post is a method you should you small brackets()

Can you Please show us the posted values, so we can see how the data is posted.


Update:

i don't know how you are posting data through submit form or through ajax, either way, check posted Values. Lets suppose if data posted through Ajax is like this. enter image description here

then i use $this->input->post('TabDesc'); and same goes for TabName and TabDesc.

now in your case if data is posted as array as you showed, try this

$this->input->post('['permission']['access']');

but i am doubtful about this post thats why i asked you to check if your form is really posting like the way you are trying to get as multidimentional.

But also see, if your form is posting like this enter image description here

then you can try like this. $textValue = $this->input->post('text['value']');

You can descrypted your input post before. the type is accsess & modify.

maybe you can change your code like this

$postType = $this->input->post('permission);

$data['access'] = $postType['access'];
$data['modify] = $postType['modify'];

hope this helpful