title: codeigniter - Redirect user after verify activation code
body: <p>i have send 4 number activation code with sms for user and i want if code is true redirect to user dashboard.
  how to do it?</p>
  
  <p>my code:</p>
  
  <pre><code>    function VerifyCode()
  {
      $this-&gt;load-&gt;model('User_model');
      $sms = $this-&gt;input-&gt;post('sms');
      $this-&gt;load-&gt;model('User_model');
      $VerifyCode = $this-&gt;User_model-&gt;ch($sms);
      if ($VerifyCode == true) {
          session_start();
          redirect('UserPanel/Dashboard');
      } else {
          echo "fail!";
      }
  }
  </code></pre>