model view controller - Issue with MVC architecture in PHP -


i going through concept of mvc in php.

i found sample code display hello world.

since new this, have no idea how implement mvc architecture radio active buttons or other buttons takes users input , stores in database.

the sample code found display hello world follows

<?php class model {     public $text;      public function __construct() {         $this->text = 'hello world!';     } }   class view {     protected $model;     protected $controller;      public function __construct(controller $controller, model $model) {         $this->controller = $controller;         $this->model = $model;     }      public function output() {         return $this->model->text ;     }  }   class controller {     protected $model;      public function __construct(model $model) {         $this->model = $model;     } }  $model = new model(); $controller = new controller($model); $view = new view($controller, $model); echo $view->output(); ?> 

i have been searching answer on web long time no success . :(

so appreciate on .it wonderful if provide me sample code . in advance .

suggest going through , watching codeigniter tutorials know framework understand concept lot better.

they explain mvc well.

also take @ this

http://net.tutsplus.com/articles/news/how-to-build-a-login-system-for-a-simple-website/


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -