Welcome Guest, Not a member yet? Register   Sign In
URL problem
#9

[eluser]Josssi[/eluser]
Thanks, it helps me for this time. I set:
Code:
$route['(:num)']= 'user/edit';
My user/edit function needed input param $user_id, now it need any param, and this part I solved this way:
Code:
function edit()
     {
{
if ($this->uri->segment(1) === false)
{
     redirect('user');
} else {
            $user_id = $this->uri->segment(1);
}
      .....
}

Now it helped me, but now I have next problem, I need to solve something similar once more. As I have in other topic written already, I have got table of products, where name each of them will as a link. This links will be designed this way:
Code:
echo 'anchor(product/edit/product_id)';
Clearly product_id is relevant number. I need to solve it same as in the first case, but now it isnt possible. Now I cant set root:
Code:
$route['(:num)']= 'product/edit';
and there is big question how to solve it now.

PS:"Just reminging, my uri address cant have more than one segment afther base_url, because when entering new uri, overwritten ist just last segment and the first one -i dont know whay- stays old, it is overwritten not:/"


Messages In This Thread
URL problem - by El Forum - 03-24-2012, 08:52 PM
URL problem - by El Forum - 03-24-2012, 10:48 PM
URL problem - by El Forum - 03-25-2012, 05:40 AM
URL problem - by El Forum - 03-25-2012, 06:58 AM
URL problem - by El Forum - 03-25-2012, 08:25 AM
URL problem - by El Forum - 03-25-2012, 09:48 AM
URL problem - by El Forum - 03-25-2012, 12:57 PM
URL problem - by El Forum - 03-25-2012, 01:24 PM
URL problem - by El Forum - 03-25-2012, 04:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB