All the examples I've seen about how and how MVC SHOULD use classes as models, classes as a controller, and HTML templates as a representation. And all of them consisted of one index.php script and different requests in the URL to launch the entire site.
So they were all kind of ...
MODEL
class User{
function getUser($userID){
$sql = mysql_query('SELECT name......');
return $array
}
}
VIEW
<h2><?php echo $user['name']; ?></h2>
CONTROLLER
class Controller{
$userModel = new User;
$userInfo = $userModel->getUser($id);
$template = new Template('usertemplate.tpl');
$template->setVariables($userInfo);
$template->display();
}
, , ( , ). , HTML. , . , script (, userprofile.php, ).
, , , , URL-, "index.php? user = 1" index.php? news = 3, . , user_profile.php? Id = 1, news.php? Id = 3...
-, , "" . ... MVC, ? Thankyou
PS.