Forum Moderators: coopster

Message Too Old, No Replies

Deleting a cookie

logout doesnŽt work

         

Malmo

10:08 pm on Sep 24, 2010 (gmt 0)

10+ Year Member



Hi guys!

I have created a login, logout system and everything works besides the logout. I am using cookies and it logs out, but if I click in the browser the left arrow to go to the previous page is everything set as I didnŽt logout.

My logout page looks like this:
setcookie("user", "", time()-10, "/");
setcookie("password", "", time()-10, "/");
header("Location: index.php");

Does someone have a solution?

I thank everyone in advance for any help IŽll get.

LifeinAsia

10:11 pm on Sep 24, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



What if you refresh the browser page after you go back? (Often, going back to the previous page doesn't refresh the browser, so it will show everything exactly as it was previously.)

Anyango

5:30 am on Sep 25, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Exactly, i think you are noticing just what LifeInAsia mentioned, that page you are seeing when you click the back button is most probably the unrefreshed version of the old page that was there

enigma1

9:07 am on Sep 25, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could convert the logout link into a post form and/or issue a redirect right after the logout operation.