Welcome Guest, Not a member yet? Register   Sign In
Cannot access class variables
#11

[eluser]WanWizard[/eluser]
Sigh. This discussion is going nowhere.

As I explained in detail earlier, URI requests are atomic, they are not aware of each other. Your ajax call with call the processAjax() method, and after that nothing happens, PHP will clean everything. When you then request SaveItem(), NOTHING from previous requests exist!

So yes, offcourse it is a new instance. Everything is new! If you want to pass data from one request to the next, you're trying to maintain state in a stateless environment, and you need sessions.
#12

[eluser]InsiteFX[/eluser]
Gee! Use $this->load->vars($data);
Code:
$this->load->vars($data);   // makes all variables aviable to all views!
$this->load->view('view_name');

Have to Agree with you WanWizard!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB