views:

86

answers:

2

how do i get the value of hidden field from controller?

i tried this:

$hidden=$this->input->post('hidden_field_name');

it showed error. The field name is correct, i double checked it.

+2  A: 

Try $_POST['hidden_field_name'];

If that doesn't work, then it's because that field_name doesn't exist.

Thorpe Obazee
+1  A: 

Make sure your HTML is right first. If it's not in "View Source" then it's not going to work.

Then:

var_dump($_POST);

If you see the item you want in there, grab it with $this->input->post();

var_dump() is your friend, use it every time you are confused.

Phil Sturgeon