[eluser]Ngulo[/eluser]
hi all i am tryng to make my pages reserved ,so i'm setting userdata('admin');
after a login action into a login.php controller
but when i redirect after login to my other controller user.php i have to make a selection like this to make it reserved:
Code:
if(! $this->session->userdata('admin'))
{redirect('login');}
this code should be incorrect beacause always after login(TRUE validation) i come back to login.php instead of been redirected to home.php
is not a problem of redirecting and there is any other problem
maybe i need a better way to say this:
Code:
if(! $this->session->userdata('admin'))
How can i write in a better way this if() function?
did anyone can help me?
thanks guys