I am trying to understand and use the MVC without a framework, until now I clearly understand what is the role of Model, View and Controller and how are they made.
But I have one question. If the Controller is a class with methods for every action in thew View, and in that method we communicate with the Model and ask some data or send some data, and then send that data to the view that we choose to display. My question is how we call that method from view when we need to send some data from view to controller?
Let say that we have a page with all users and when we click one user we want information about him and we send his id with post or get and we have a UserController with a GetUserInformation method wich communicate with model send the id receive the information set it to the view and call view() to show the information.
How do we call this method from View when the client clicks that user?
We made another file between them and send the user to that file and in that file we instantiate a controller object and call the method? But if we do that how is that file called in MVC?
And there are a lot of example, like login, add a user and so on when we need to call a method from controller and send some data or just call it without send data.
The general idea is how we call a method from a Controller object on an action in html page?