Jump to content


Photo

logout and session_destroy() help *SOLVED*


  • Please log in to reply
1 reply to this topic

#1 digitalgod

digitalgod
  • Members
  • PipPipPip
  • Advanced Member
  • 374 posts

Posted 22 July 2006 - 01:59 AM

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?

<?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>");
  }
}
?>


#2 digitalgod

digitalgod
  • Members
  • PipPipPip
  • Advanced Member
  • 374 posts

Posted 22 July 2006 - 02:01 AM

nevermind it works now




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users