Welcome Guest, Not a member yet? Register   Sign In
session is being expired autometically
#3

example ur: http://www.domainname.com/temp/welcome/index

when I open it then refresh it.. if session is set then it will show Session working message. then remove the index from url and write about.. it will still show the session working message.

but when I'm clicking on the about hyperlink bellow the message "session working" then session is gone.

here below is the controller code:

PHP Code:
class Welcome extends CI_Controller {

    public function 
index()
    {
     
   if(isset($_SESSION['test_session'])){
     
       echo "session working";
     
   }else{
     
       $this->session->set_userdata('test_session''session set');
     
   }
     
   
        echo 
'<br><a href="'.base_url().'welcome/about'.'">about </a>';
    }
    
    public function 
about()
    {
     
   if(isset($_SESSION['test_session'])){
     
       echo "session working";
     
   }else{
     
       redirect('welcome/index''refresh');
     
   }
    }


I have also attached the cofig folder please check and let me know.. How can I solve the issue.

Attached Files
.zip   config.zip (Size: 21.94 KB / Downloads: 24)
Reply


Messages In This Thread
RE: session is being expired autometically - by tysonchamp - 09-26-2017, 08:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB