title: How to go to different page from one register form in codeigniter
body: <p>Hi I am beginner in codeigniter and have one question about form in codeigniter. I have 3 items that if click on If you register in site go to destination.But if dont register first he must register then redirect to the page he want.But i cant go to different page.
   my view:</p>
  
  <pre><code>&lt;div class="row"&gt;&lt;!--row of kol--&gt;
  
  
          &lt;br/&gt;
          &lt;div class="col-md-2 col-sm-2 col-xs-2"&gt;&lt;/div&gt;
          &lt;div class="col-md-8 col-sm-8 col-xs-8" 
          style="border:1px solid black;"&gt;
          &lt;div class="row"&gt;
          &lt;div class="col-md-12"&gt;
  
          &lt;div class="col-md-5"style="border:1px solid gray;"&gt;
          &lt;form class method="post" action="&lt;?php echo base_url(); ?&gt;index.php/verifylogin"&gt;
              &lt;div class="form-group"&gt;
                 &lt;label&gt;username&lt;/label&gt;
                 &lt;input class="form-control" id="namekarbari" name="namekarbari" 
                 autocomplete="off"
                 value="&lt;?php echo set_value('namekarbari')?&gt;"
                 &gt;&lt;/input&gt;&lt;?php echo form_error('namekarbari'); ?&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                 &lt;label&gt;password&lt;/label&gt;
                 &lt;input  type="password" 
                 class="form-control" id="kalameoboor" name="kalameoboor" 
                 autocomplete="off"value="&lt;?php echo set_value('kalameoboor')?&gt;"
                 &gt;&lt;/input&gt;&lt;?php echo form_error('kalameoboor'); ?&gt;
              &lt;/div&gt;
  
            &lt;button&gt;&lt;/button&gt;
          &lt;/form&gt;
  
  
  
          &lt;/div&gt;
  
  
          &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-md-1 col-sm-1 col-xs-1"&gt;&lt;/div&gt;
          &lt;/div&gt;
  
  
  
      &lt;br/&gt;
  
  
  
  
  &lt;/div&gt;&lt;!--end container--&gt;      
  &lt;script src="&lt;?php echo base_url(); ?&gt;boot/js/jquery.js"&gt;&lt;/script&gt;
  &lt;script src="&lt;?php echo base_url(); ?&gt;boot/js/bootstrap.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>my verifylogin controller:</p>
  
  <pre><code>    &lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  class VerifyLogin extends CI_Controller {
  
   function __construct()
   {
     parent::__construct();
     $this-&gt;load-&gt;model('user','',TRUE);
   }
  
   function index()
   {
     //This method will have the credentials validation
     $this-&gt;load-&gt;library('form_validation');
  
     $this-&gt;form_validation-&gt;set_rules('namekarbari', 'Username', 'trim|required');
     $this-&gt;form_validation-&gt;set_rules('kalameoboor', 'Password', 'trim|required|callback_check_database');
     $this-&gt;form_validation-&gt;set_message('required'," %s ");
     $this-&gt;form_validation-&gt;set_message('trim'," %s ");
  
  
     if($this-&gt;form_validation-&gt;run() == FALSE)
     {
       //Field validation failed.  User redirected to login page
       $this-&gt;load-&gt;view('login_view');
     }
     else
     {
       //Go to private area
       redirect('home', 'refresh');
     }
     }
     }?&gt;
  </code></pre>
  
  <p>I want to redirect to different page from verifylogin.
  thanks...</p>