Welcome Guest, Not a member yet? Register   Sign In
if on session->userdata()
#1

[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


Messages In This Thread
if on session->userdata() - by El Forum - 04-10-2010, 07:03 PM
if on session->userdata() - by El Forum - 04-10-2010, 07:22 PM
if on session->userdata() - by El Forum - 04-10-2010, 09:08 PM
if on session->userdata() - by El Forum - 04-10-2010, 09:55 PM
if on session->userdata() - by El Forum - 04-10-2010, 10:06 PM



Theme © iAndrew 2016 - Forum software by © MyBB