Routing and URI parsing in Codeigniter

Posted by bobo on Stack Overflow See other posts from Stack Overflow or by bobo
Published on 2011-01-06T06:49:17Z Indexed on 2011/01/06 6:53 UTC
Read the original article Hit count: 299

I have a route defined in CI,

$route['user/activate-account/:any'] = "user/activate_account";

People access the route in this url pattern,

http://mydomain.com/user/activate-account/user_id/12345/token/abcdefghijk

Inside the activate_account function, I tried to use the following codes to retrieve the required data,

$user_id=$this->input->get('user_id');
$token=$this->input->get('token');

But they return FALSE, does this mean that for this kind of url pattern, I am supposed to use the functions provided by the URI class (http://codeigniter.com/user_guide/libraries/uri.html) to retrieve the variables?

© Stack Overflow or respective owner

Related posts about php

Related posts about codeigniter