Controllers using private variables - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Controllers using private variables (/showthread.php?tid=44725) |
Controllers using private variables - El Forum - 08-24-2011 [eluser]Unknown[/eluser] Hello am a codeigniter newbie and am in love with this frame work. I have hit a snag in controllers where by i want to use a private variable in two controllers like this Code: class data extends CI_Controller{ In the above code when i run the showData() controller it is always empty (My gues is that the class is instantiated in each page am i right? e.g /home/ and /home/showdata will result in two different classes) My question is how would i set variables in one controller to accessed in another controller? |