[eluser]Tomer Simis[/eluser]
I'm creating a site with a login panel, and when the user log on, it would display a message, but i dont know how to do this in CodeIgniter.
In normal PHP, its like this:
Code:
if(isset($_SESSION['login'])){
echo '<p>You are logged.</p>';
if($_SESSION['type'] == 'admin'){
echo '<p>Im a admin</p>';
}
}else{
echo '<p>You are not logged.</p>';
}
but in codeigniter its hard, can i check the session in the view? or i need to pass the status from the controller?
Please, help me guys
Thanks