Welcome Guest, Not a member yet? Register   Sign In
is it possible?
#1

[eluser]xeroblast[/eluser]
i am trying to load the result of the controller to another controller...

what i mean is like this...

Code:
$data['result'] = // the result of the controller here
$this->load->view('view_html',$data); // load the result to the view

the controller result is an html form

my last option is to create a helper the can load the html form...

any bright ideas...
#2

[eluser]Phil Sturgeon[/eluser]
You shouldn't be trying to load a controller directly. If the form is HTML why not load a view and assign it to that variable?
#3

[eluser]xeroblast[/eluser]
so you are saying i could do it like this:

Code:
$data['result'] = $this->load->view('loaded_html');
$this->load->view('view_html',$data);
#4

[eluser]Phil Sturgeon[/eluser]
[code]$data['result'] = $this->load->view('loaded_html', NULL, TRUE);
$this->load->view('view_html',$data);

The NULL is instead of the usual $data variable, and TRUE means "return the output instead of sending it to the browser".
#5

[eluser]Pintossauro[/eluser]
I think that you have to do:
Code:
$string = $this->load->view('myfile', '', true);
#6

[eluser]xeroblast[/eluser]
ok.. thanx.. that is what i needed...




Theme © iAndrew 2016 - Forum software by © MyBB