How do I pass an argument to the index function? |
If I have
Code: class Admin extends MY_Controller { It will look for a method or function called open in my Admin controller. What if I want it to pass a url segement called open to the Index function? What do I do?
For the link, you could use example.com/admin/index/open
Or you need to use URI Routing. That can get troublesome if you have a lot of other admin methods that use the standard URL to controller/method/arg mapping.
You can also use the URI Class segment methods.
CodeIgniter User Guide - URI Class What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |