Author Topic: unset session variables  (Read 4156 times)

Offline brooks

  • Newbie
  • *
  • Posts: 2
unset session variables
« on: January 13, 2014, 06:57:45 AM »
I'm trying to unset session variables and cookies without using the logout task. All I see are these, but even after unsetting them, I'm still logged in. Can anyone help?

unset($_SESSION['sess_id']);
unset($_COOKIE['roundcube_sessid']);
unset($_COOKIE['roundcube_sessauth']);

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,883
    • SKaero - Custom Roundcube development
Re: unset session variables
« Reply #1 on: January 13, 2014, 07:28:28 AM »
Your not removing the cookies correctly http://php.net/setcookie

Offline brooks

  • Newbie
  • *
  • Posts: 2
Re: unset session variables
« Reply #2 on: January 13, 2014, 08:01:23 AM »
I guess the easiest way is to delete it from table.
Code: [Select]
mysql_query("DELETE FROM `session` WHERE `sess_id` = '$cookie'");