Destroy Session

0 kristhian cadiz · October 19, 2014
Hello Bukcy


  Can you post a tutorial on destroy sessions? what i wanted to ask is when i destroy a session it will just stay to the header location and everytime i click back it will just stay on the header location i directed it to coz it still directs me to the previous site that i visited when i click back.. what im trying to say is that when i logged out it will just stay on the page.. and when i click back it wont direct me to the current pages i visited.. hope you get what im trying to imply here :P

Thank you.

Post a Reply

Replies

Oldest  Newest  Rating
0 Calvin Sienatra · October 24, 2014
Something like this maybe?

header.php

<a href="logout.php?page=<?echo basename($_SERVER['PHP_SELF']);?>">logout</a>



logout.php
$curpage = $_GET['page'];
session_destroy();
echo "<script type='text/javascript'>window.location.href = '".$curpage."';
</script>";


If php is what you mean..
  • 1

General Chat

107,247 followers
About

Chat about anything non-computer related including, music, movies, tuna sandwiches, and more!

Links
Moderators
Bucky Roberts Administrator