CodeIgniter Forums
How to make variables global ? i.e acessing a variable from model and controllers. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: How to make variables global ? i.e acessing a variable from model and controllers. (/thread-45898.html)



How to make variables global ? i.e acessing a variable from model and controllers. - El Forum - 10-10-2011

[eluser]Vaibhav132[/eluser]
I had been working on this framework since last one week.I am working on Email Confirmation functionality.My Problem is that i am creating a random string in controller and trying to use the same same string in the model.But this randomly created string(in main controller) is not accessible in the model page.
I am getting an error Undefined variable confirmation_code.

Can any one help me with this minor issue.??