Hi Guys, am new to codeigniter, i used active record to update my data in my database and its updated inside the database, : am new to codeigniter, i used active record to update my data in my database and its updated inside the database, but after updating data inside the database, i want it to redirect back to my Edit Page showing the updated data from my database.. i have tried all my possible best but its not working.. pls help..

my codeigniter version is 2.7

<!--THIS IS MY CONTROLLER-->
<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

    class account extends CI_Controller {
    function __construct()
    	{
    	parent::__construct();
    		
    		}
    	
    public function index(){
    	
    	$username = $this->input->post('username');
    	$password = $this->input->post('password');
    	$result = $this->login_model->database($username, $password);
    	if ($result == TRUE){
    	$data['posts'] = $result;
    	$data['subview'] = 'testview';
    		$this->load->view('display', $data);
    	}else{
    	echo "invalid password";
    	};
    }

    public function edit(){
    	$id = $this->input->post('id');
    	$name = $this->input->post('name');
    	$email = $this->input->post('email');
    	$telephone = $this->input->post('telephone');
    	$result = $this->login_model->update($id, $name, $email, $telephone);
    	
    	if ($result == TRUE){
    	redirect('account/edit');
    	
    	}
    	
    	}

    }

<!-- end snippet -->


      <!--THIS IS MY MODEL-->

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

    class login_model extends CI_Model {
    function __construct()
    	{
    	parent::__construct();
    		
    		}
    	
    	public function database($username, $password)
    	{	
    		$this->db->select('*');
    		$this->db->from('user');
    		$this->db->where('username', $username);
    		$this->db->where('password', $password);
    		$this->db->limit(1);
    		$query = $this->db->get();
    		if($query->num_rows() ==1){
    			return $query->result();
    			}else{
    			return false;
    			}
    	}
    	
    	public function update($id){
    	$data = array(
                   'id' => $this->input->post('id'),
                   'name' => $this->input->post('name'),
                   'email' => $this->input->post('email'),
                   'telephone' => $this->input->post('telephone'),
                );

    $this->db->where('id', $id);
    $this->db->update('user', $data); 
    }

    }

<!-- end snippet -->

