Jump to content


Photo

problem with two sessions on logout

sessions multiple logout php

Best Answer jasmeet, 07 September 2013 - 04:23 AM

what is your logout.php page script, you may have used session_destroy(), it will destroy all your registered sessions

 

instead of session_destroy() use Unset()

thanks!!   it works.. :)

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 jasmeet

jasmeet

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts

Posted 07 September 2013 - 01:09 AM

i am using sessions. first on admin folder and second on user folder. 

in admin folder, i use $_SESSION['username'];

in user folder, i use $_SESSION['username1'];

 

now when i click on logout button in localhost/xxx/admin/logout.php

i also logged out from localhost/xxx/logout.php.

 

is there a way.. not to be logged out from user panel when click logout button in admin panel????



#2 PravinS

PravinS

    Advanced Member

  • Members
  • PipPipPip
  • 429 posts
  • LocationNashik, India

Posted 07 September 2013 - 01:46 AM

what is your logout.php page script, you may have used session_destroy(), it will destroy all your registered sessions

 

instead of session_destroy() use Unset()


Thanks & Regards,
PravinS | Blog


#3 jasmeet

jasmeet

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts

Posted 07 September 2013 - 04:23 AM   Best Answer

what is your logout.php page script, you may have used session_destroy(), it will destroy all your registered sessions

 

instead of session_destroy() use Unset()

thanks!!   it works.. :)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com