CodeIgniter Forums
Passing variable issue - 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: Passing variable issue (/thread-40714.html)



Passing variable issue - El Forum - 04-16-2011

[eluser]MrCrozer[/eluser]
I'm woundering, how this will happen ?
I want to pass the $_GET value from a view to a model, so i can check the db for that item for example.
How to do such a thing, or how to do something like it ?


Passing variable issue - El Forum - 04-16-2011

[eluser]toopay[/eluser]
Code:
// eg : url = http://yoursite.com/controllername?foo=bar, then in controllername's index function,
// you can fetch the $_GET var by...
$this->input->get('foo');