I am accessing user profile page with this type of url
foo.com/index.php/controller/view_profile/user_id
its working fine. In the profile page I have different segement of the profile and using buttons for them.
if I click on a button which should take me to user financial data, its redirects to
foo.com/index.php/controller/view_profile/user_finance/user_id
instead of
foo.com/index.php/controller/user_finance/user_id
in the button link i just used following code
echo '<a href="user_finance/'.$user_id.'"><button class="btn btn-info btn-large">Financial Information</button></a>';
What am I doing wrong? Thanks in advance.
Please use the following to generate the code for the link.
$array = array(
'class' => '<button class="btn btn-info btn-large">'
);
echo anchor('controller/user_finance/' . $user_id,"Financial Information",$array);
EDIT:
The above link you are using wont work as it needs full url which anchor
helper will generate.