Jump to content

Archived

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

digitalgod

logout and session_destroy() help *SOLVED*

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]

Share this post


Link to post
Share on other sites

×

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.