Welcome Guest, Not a member yet? Register   Sign In
[Help me] Problem with browsers
#1

[eluser]Unknown[/eluser]
Hi everyone,

I have this problem when i'm using codeigniter:

when i'm using mozilla firefox to operating the auth session to log in and log out, my program seems to work normally. the auth log in and the log out can working normally. when i'm log out the session destroyed and unset properly.


but, when i'm using opera, the session destroyed, but when i press back button, i still can access my secret page. What should I do to make this compatible for all browsers?

Please help me then. Thnks...

anyway, this is my controller script:

Code:
class Administrator extends Controller {

function __Construct()
    {
        parent::Controller();
        $this->is_logged_in();

         //-------this code will remove all last session tracked--------//

$this->output->set_header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT');
        $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
        $this->output->set_header('Pragma: no-cache');
        $this->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
      //-----------------------------------------------------------------------//

    }
function admin_view(){
  $data['main_content'] = 'admin_view';
                $this->load->view('includes/template_admin',$data);
}

    function is_logged_in()
    {
               $is_logged_in = $this->session->userdata('is_logged_in');
        
               if(!isset($is_logged_in) || $is_logged_in!=true)
               {
               echo "you don't have permission to access this page. Please Login</a>";
                die();
        }
    }

function log_out(){
  $this->session->unset_userdata('is_logged_in');
  $this->session->unset_userdata('username');
  $this->session->unset_userdata();
               $this->session->sess_destroy();
  redirect('home/index');
}





Theme © iAndrew 2016 - Forum software by © MyBB