Welcome Guest, Not a member yet? Register   Sign In
URL Parameter passing
#1

[eluser]vindhyareddy[/eluser]
I am developing a RESTful web services API.

I am trying to run the url :
http://localhost/devit/users/test/12/user/123

Code:
function test_get()
    {
        $user_type = $this->uri->segment(3, 'default value');
        $user_id = $this->get('user');
        echo $user_type;
        echo $user_id;
    }

In the url , devit is my folder
users is my controller name
test if the function name
user is a parameter
12 is a param value..without any param name..
123 is a parameter value of the parameter user.

When I try running this, I am not able to get the value of $user_id
However I am able to get the value of $user_type.

Cant I give any other parameter names after a parameter without a param name?

Hope to get a reply asap!


Messages In This Thread
URL Parameter passing - by El Forum - 07-22-2010, 06:58 PM
URL Parameter passing - by El Forum - 07-23-2010, 02:28 AM
URL Parameter passing - by El Forum - 07-23-2010, 02:38 AM
URL Parameter passing - by El Forum - 07-23-2010, 03:14 AM
URL Parameter passing - by El Forum - 07-23-2010, 03:19 AM
URL Parameter passing - by El Forum - 07-26-2010, 11:29 AM
URL Parameter passing - by El Forum - 07-27-2010, 12:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB