CodeIgniter Forums
Passing variable issue - 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: Passing variable issue (/showthread.php?tid=40714)



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');