Welcome Guest, Not a member yet? Register   Sign In
One if statement to rule them all
#4

[eluser]brianw1975[/eluser]
simply reverse your logic...

Code:
if($this->session->userdata('logged_in') != TRUE)
            redirect('/');
else{
            $data['username'] = $this->session->userdata('email');
            $data['firstN'] = $this->session->userdata('first_name');
            $data['lastN'] = $this->session->userdata('last_name');
            $data['city'] = $this->session->userdata('city');
            $data['state'] = $this->session->userdata('state');
   // continue on and let the controller do what it needs to do
}


Messages In This Thread
One if statement to rule them all - by El Forum - 09-08-2009, 06:36 PM
One if statement to rule them all - by El Forum - 09-08-2009, 07:43 PM
One if statement to rule them all - by El Forum - 09-08-2009, 07:50 PM
One if statement to rule them all - by El Forum - 09-08-2009, 08:08 PM
One if statement to rule them all - by El Forum - 09-08-2009, 08:15 PM
One if statement to rule them all - by El Forum - 09-09-2009, 12:10 AM
One if statement to rule them all - by El Forum - 09-09-2009, 01:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB