title: Codeigniter - Passing multiple parameters
body: <p>I am trying to pass multiple parameters to my model from my controller. It seems that the <code>$scholId</code> that I am trying to pass won't go through to the model after I submit the form. However, the <code>$userId</code> goes through to the database just fine. Is there something wrong with <code>$this-&gt;uri-&gt;segment(4)</code> that won't pass through correctly?</p>
  
  <pre><code>function apply() 
  {
      $this-&gt;load-&gt;helper('form');
      $this-&gt;load-&gt;library('form_validation');
  
      $scholId = $this-&gt;uri-&gt;segment(4);
  
      $userId = '2'; //User query -&gt; this will be taken from session
  
      $this-&gt;data['scholarship'] = $this-&gt;scholarship_model-&gt;getScholarship($scholId);
      $this-&gt;data['title'] = "Apply";
  
      $this-&gt;form_validation-&gt;set_rules('essay', 'Essay', 'required');
  
      if ($this-&gt;form_validation-&gt;run() === FALSE)
      {
          $this-&gt;load-&gt;view('templates/header', $this-&gt;data);
          $this-&gt;load-&gt;view('student/page_head', $this-&gt;data);
          $this-&gt;load-&gt;view('student/form', $this-&gt;data);
          $this-&gt;load-&gt;view('templates/footer', $this-&gt;data);
      }else{
          // Validation passes
          $this-&gt;users_model-&gt;applySchol($userId,$scholId);
          redirect('/scholarships');
      }
  }
  </code></pre>