Welcome Guest, Not a member yet? Register   Sign In
passing array to controller
#1

[eluser]Unknown[/eluser]
Hello everyone,

I am new to CI, and find some problem when passing array from view to controller.
Supposed I have array like this :

Code:
$data['task_no'] = 'JC_001';
$reference = array('Task_1','Task_2','Task_3');
$data['reference'] = $reference;
$this->load->view('myview', $data);

I want to make 'edit' link from view to controller,
therefore I need to pass 'task_no' and array 'reference' within link like so :

Code:
&lt;?php echo "<td>". anchor('perf/editmat/'.$task_no.'/'.serialize($reference),'Edit') ."</td>"; ?&gt;

But somehow, an error appear :
Code:
An Error Was Encountered
The URI you submitted has disallowed characters.

Is it possible to pass array to controller?

Thanks for the help.


Messages In This Thread
passing array to controller - by El Forum - 12-14-2010, 09:14 PM
passing array to controller - by El Forum - 12-15-2010, 09:11 AM
passing array to controller - by El Forum - 12-15-2010, 10:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB