title: How to get data from a form in php mvc
body: <p>I'm starting to learn php and mvc and this is what I want to do. I want to create a simple login form. 
  My login form is is as follows</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;form action = "index.php" method = "post"&gt;
  userName : &lt;input type = "text" name = "username"/&gt;
  Password : &lt;input type = "text" name = "password"/&gt;
  &lt;br/&gt;
  &lt;input type = "submit" value = "login" name = "btnlogin"/&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>, and I have my models and views all set up, but how do I pass this information to the model, my controller class is as follows</p>
  
  <pre><code>&lt;?php
  
  class controller
  {
  public $modelBook;
  public $view;
  public $modeluser;
  
  
  function __construct()
  {
      $this-&gt;modelBook = new Book();
      $this-&gt;view = new view();
      $this-&gt;modeluser = new members();
  
      $this-&gt;Home();
  }
  
  function Home()
  {
      $this-&gt;view-&gt;viewThis('login.php');
  }
  
  function login($username,$password)
  {
      $data = $this-&gt;modeluser-&gt;login($username, $password);
      $this-&gt;view-&gt;viewThis('member.php',$data);
  }
  </code></pre>
  
  <p>the login view loads, but how do I get the data in the form to the model using the login function?</p>
  
  <p>EDIT :</p>
  
  <p>my index.php 
      
  
  <pre><code>define ('SERVER_ROOT','C:\wamp\www\eclipse\MVCLMS');
  
  define ('SITE_ROOT', 'http://localhost');
  
  require_once 'controller/router.php';
  
  ?&gt;
  </code></pre>
  
  <p>my router.php file</p>
  
  <pre><code>&lt;?php
  include 'model/modelBook.php';
  include 'model/modelLogin.php';
  include 'view/load.php';
  include 'controller/controller.php';
  
  $controller = new controller();
  ?&gt;
  </code></pre>