Welcome Guest, Not a member yet? Register   Sign In
routing issue?
#6

[eluser]Ninjabear[/eluser]
[quote author="andieevans" date="1332504066"]Hey ninjabear, thanks again for the headsup... I think I will stop with all this routes stuff...

so if I have a url like this:

index.php/public_site/news/1

how do I access the value 1?

[/quote]

You would use something like: $this->uri->segment(3) or there is rsegment() to use the routed segment number.

You can also do something like:

Code:
function mymethod($id)
{
  echo $id;
  echo $this->uri->segment(3); // Does same thing.
}

I recommend looking up the Shawn McCool tutorials, those will teach you loads of stuff.


Messages In This Thread
routing issue? - by El Forum - 03-23-2012, 01:00 AM
routing issue? - by El Forum - 03-23-2012, 03:19 AM
routing issue? - by El Forum - 03-23-2012, 04:04 AM
routing issue? - by El Forum - 03-23-2012, 04:39 AM
routing issue? - by El Forum - 03-23-2012, 05:01 AM
routing issue? - by El Forum - 03-23-2012, 05:59 AM
routing issue? - by El Forum - 03-23-2012, 06:07 AM
routing issue? - by El Forum - 03-23-2012, 08:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB