Welcome Guest, Not a member yet? Register   Sign In
Loading externa/internal views correctly
#1

[eluser]codeboy[/eluser]
Hey All,
I load an external (landing page) or an internal page (after someone logs in) depending on the session variable (logged_in) that I set when someone logs in. I find that this breaks when

1. I login
2. Close the browser
3. Open the browser and I hit the same URL again

Instead of getting the external landing page, I get internal page with the content of the external page (and does not look pretty!). It looks like my session was not destroyed completely when I closed the browser.

I also check to see if the session is valid (sess_read) but that does not seem to work either.

Code:
#Always check if the session is valid
  if (($this->session->sess_read()) && ($this->session->userdata('logged_in') == true)) {
    $this->load->view('master_view_ext_logged_in', $data);
  } else {
    $this->load->view('master_view_ext', $data);
  }

Any pointers are appreciated.

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB