MVC Pattern Implementation
Okay i'm trying to learn how to make an MVC. I quickly found out reading up on the concept and trying to put it in your code are two very different things. So far i have this idea:
When the user goes to a page (website.com/index), the controller is activated and checks the url for a query string. depending on the query string (foo.com/view/action/param/param...) it grabs the view (contents of the page) from the view class and spits it out.
When the user wants to log in or something, they would click a link that would go to website.com/view/login and i guess the view would pass parameters to the controller and the controllers sends that to the model, the model validates everything and sends back either an error message or logs the user in, the controller gets that response and sends it back to the view. Is this how it's supposed to work? And if so, how could you impliment this in code? I would really like to see an example if possible