Welcome Guest, Not a member yet? Register   Sign In
sess_destroy() funciton works 2nd time
#1

[eluser]Sumon[/eluser]
I am getting an amazing problem. Here is my Logout function
Code:
function Logout()
{
   if($this->session->sess_destroy())
      redirect("home");
    else
    {
    $this->load->view("error");
    }
}

First time when i click logout link(www.mysite.com/member/Logout) it's not working but 2nd time when i click on same link my session values cleared but my session still not destroyed and load error page.
#2

[eluser]GSV Sleeper Service[/eluser]
try the refresh method of redirect?
Code:
redirect("home","refresh");
#3

[eluser]Sumon[/eluser]
But my flow goes to the else block. I mean it goes to $this->load->view("error"); for both first and 2nd time attempt of logout.
#4

[eluser]Seppo[/eluser]
Actually sess_destroy returns void, not TRUE/FALSE so it will never execut the redirect.
#5

[eluser]Sumon[/eluser]
really amaging..... It makes me panic... thanks a lot buddy.

Aminul




Theme © iAndrew 2016 - Forum software by © MyBB