variable from input to view |
Hi guys! I am new in CodeIgniter and I have one probably simple question. I tried google it but I couldn't found right answer or I just didn't new how to usi it in my code.
So, what I want is that from prisijungus.php (this is from my native language) form_input set variable that I could use in other view file. This is my view file prisijungus.php: PHP Code: <?php In other view file I will just echo variable. I hope you understand what I want, sorry for bad english and thanks for reply's!
There are several ways of doing this.
1) Use a session variable. 2) CI way: Makes them global to all views. PHP Code: $data['your_variable'] = 'your_variable'; 3) Find a good Registry Class and store them in it. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
You can't use it like this way, you have to make that variable "GLOBAl". Please browse the net to make variable in CI.
I give a hint, that it will be done in the MY_Controller.php file,I hope you extend the CI_Controller in the core folder. |
Welcome Guest, Not a member yet? Register Sign In |