title: Passing multiple parameters to index controller using CodeIgniter-like MVC
body: <p>I am just beginning to learn PHP, so I apologize if this is a basic question. I am using what I understand to be a CodeIgniter-like MVC framework (NOT CI though - a homegrown framework) </p>
  
  <p>I am trying to pass two parameters to my index controller, each of which will display a different error message. The errors are generated from two individual post functions (i.e., if user's log in is incorrect and if email already exists at sign up).</p>
  
  <pre><code>public function index($error1=NULL, $error2=NULL) {
  
  $this-&gt;template-&gt;content = View::instance('v_index_index');
  $this-&gt;template-&gt;content-&gt;error1 = $error1;
  $this-&gt;template-&gt;content-&gt;error2 = $error2;
  
  echo $this-&gt;template;
  
  }
  </code></pre>
  
  <p>What I am observing is that the only error displayed is the parameter that appears in the parentheses first (e.g., at index/index/error2 the error1 message is displayed). I've already tested the logic for determining the error type, so I know that is correct and believe it must have something to do with the above. </p>
  
  <p>Any help is greatly appreciated!</p>