CodeIgniter Forums

Full Version: Layout Library Redirecting Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Gurkan OLUC[/eluser]
Hi All,
I use Layout Library in my project. Evertyhing is okay but there is 1 problem which is the biggest one. I can't redirect with ci redirect() function because page gives me "headers already sent by" error message Sad codes are below,
class Users extends controller {
    function Users() {

    # Giriş Yap
    function login() {
        $username = $this->db->escape_str($this->input->post('username'));
        $password = md5($this->input->post('password'));
        if ( $this->users->beLogin ( $username, $password )) {
            $userID = $this->user->getUserID ( $username );
            $this->session->set_userdata('user_id', $userID );
            if ($this->users->isFirstLogin ( $username )) {
            } else {
        } else {
            $data['message'] = 'Kullanıcı Adınızı Veya Şifrenizi Yanlış Girdiniz!';
            $data['redirect'] = base_url();
            $data['time'] = 5;

Thanks for help..

Note : before the load system switching I was loading views directly

El Forum

[eluser]Gurkan OLUC[/eluser]
anyone has an idea? Sad