Welcome Guest, Not a member yet? Register   Sign In
Passing Parameters to Controllers
#2

[eluser]Colin Williams[/eluser]
Since you can't seem to extrapolate from the User Guide, I'll try to explain it directly.

In CodeIgniter, you can view a url like this: http://www.example.com/controller/function/category/id

controller: This is the controller file and class that is invoked
function: This is the member function of the controller class that is called
category: This is passed as the first parameter to function
id: This is passed as the second parameter to function

Any more segments in the URI beyond these need to be fetched with one of the URI class methods ($this->uri->segment(), $this->uri->rsegment(), etc).


Messages In This Thread
Passing Parameters to Controllers - by El Forum - 09-20-2008, 02:57 AM
Passing Parameters to Controllers - by El Forum - 09-20-2008, 04:14 AM
Passing Parameters to Controllers - by El Forum - 09-20-2008, 10:57 AM
Passing Parameters to Controllers - by El Forum - 09-21-2008, 01:45 AM
Passing Parameters to Controllers - by El Forum - 09-21-2008, 01:53 AM
Passing Parameters to Controllers - by El Forum - 09-21-2008, 02:14 AM
Passing Parameters to Controllers - by El Forum - 09-22-2008, 06:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB