Jump to content

logout and session_destroy() help *SOLVED*


digitalgod

Recommended Posts

hey guys,

I made this logout script but it doesn't seem to work, all I get is a blank page and if I press back on the browser I'm still logged in..
any clues why it's not working?

[code]
<?php

include("includes/config.php");
if (isset($_COOKIE['remember'])) {
setcookie("remember",$_COOKIE['remember'],time()-3600,"/",$site_address);
print("<script> location=\"index.php\"; </script>");
}
else {
  if (isset($_SESSION['remember'])) {
  session_destroy();
  print("<script> location=\"index.php\"; </script>");
  }
  else {
  print("<script> location=\"index.php\"; </script>");
  }
}
?>
[/code]
Link to comment
https://forums.phpfreaks.com/topic/15308-logout-and-session_destroy-help-solved/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.