A demo for MVC in php.
For better readability, rather than mixing our php and html, we can have our project organized in a new software design pattern called MVC( Model View Controller ) MVC divides the related program logic into three interconnected elements:
- Model: ( The User interface ) interacts with the database. It receives, stores and retrieves data for the user.
- View: ( The business logic layer ) displays information to the user and integrates data from the controller.
- Controller: ( The application logic layer ) sends and receives data from the model and passes to the view.