jeudi 3 septembre 2015

Check session in codeigniter

I am new to CODEIGNITER framework and i have a problem to check whether is set session['username']

in "php" I would just do :

if( is set ($_SESSION['username'])){
        $username = $_SESSION['username'];
        //...more code here
    }  else {
        //more code here
    }

But i don't know how to test that in this framework. Thanks to everyone willing to help me!

Aucun commentaire:

Enregistrer un commentaire