call the controller method in href in a button, in a view


iam back with another question to do with mvc and codeigniter. just getting a bit confused with the concept of MVC. First of all i have a button. i want it to reference another page. how i was going to access the next "view" or page was from this view was with a simple href="" inside a button like below.

href="<?php echo base_url();?>index.php/user/admin"

but this is a call to a method in my controller, which redirects to admin page. from what ive read this is bad practice as you cant call a controller method from a view. fair enough. but how do i actually link to the next page then? cheers

You always interact with the controller directly from the view. Calling href="<?php echo base_url();?>index.php/user/admin" means you interacting with the admin function of user controller and this is perfectly fine. No worries.