HI,can i ask about codeigniter here,I am still learning on this.my problem is that how can i display after i redirect to my welcome.php

something like this
Welcome jemz

here is my code under controller login.php

Code:
<?php

 class Login extends CI_Controller{
     function index(){
        $data['maincontent'] = "loginform";
        $this->load->view("includes/template",$data);
     }

     function validateinputs(){
         $this->load->model('user_model');

         $query = $this->user_model->checklogin();

         if($query){
             $data = array(
                     'username'=>$this->input->post('username'),
                     'is_logged_in'=>true

             );
             $this->session->userdata($data);
             $username = $this->session->userdata('username');
             redirect('site/welcome');
         }
         else
             $this->index();


     }

 }