<?php include "controller.php"; include "view.php"; include "model.php"; //The model is where all of the logic of the program resides. $model = new model(); //The View is where everything that is displayed to the user. $view = new view(); //The Controller is all user input. $control = new controller(); $model->process_input($control->input($_REQUEST)); $view->change_view($model->appropriate_view());
<?php include "Controller.php"; include "View.php"; include "Model.php"; $model = new model(); $view = new view(); $control = new controller(); $control->user_input($_POST); $model->process_input($control->get_user_input()); $view->set_state($model->get_state()); $view->display($control->get_view());