Passing URI segments to my functions |
[eluser]jimps[/eluser]
Hi! I have a problem with my URI segments, i want them to my functions but it does not work. http://ellislab.com/codeigniter/user-gui...passinguri This is my .htaccess: Code: <IfModule mod_rewrite.c> And this is my routings: Code: $route['([a-zA-Z0-9_-]+)'] = "profile/view/$1"; So it's the $1 value i want to be passed to the view method in the profile controller. But it's always undefined. How can i solve this? Thanks. Regards, Jimps
[eluser]keld[/eluser]
You don't need to use $route to do that, you can just do it from your controller like: [code] $getvar=$this->uri->segment(3); $this->load->view('mypage', $getvar); [code] And now you can access it from your view. |
Welcome Guest, Not a member yet? Register Sign In |