I have done a logout page for logout from admin section and provides a link to logout from admin section.Wheneve r i clicked on logout link it redirected to index.php of admin section......BU T when i am tring to go back threw back button of Browser....it send me last visted pages(means sessons not expire properly). How can i solve it... One more thing is that the script is working properly on localhost....pr oblem occures when i uploaded it on server.
code of logout is following....
[php]<?phpsession_st art();
if($_SESSION['user_id']!="" && $_SESSION['user_pwd']!="")
{
$_SESSION=array ();
session_unset() ;
session_destroy ();
?>
<script>
window.location .href="index.ph p";
</script>
<?php
}
else
{ ?>
<script>
window.location .href="index.ph p";
</script>
<?php } ?>[/php]
Please enclose any code within the proper code tags. See the Posting Guidelines on how to do that. - moderator
code of logout is following....
[php]<?phpsession_st art();
if($_SESSION['user_id']!="" && $_SESSION['user_pwd']!="")
{
$_SESSION=array ();
session_unset() ;
session_destroy ();
?>
<script>
window.location .href="index.ph p";
</script>
<?php
}
else
{ ?>
<script>
window.location .href="index.ph p";
</script>
<?php } ?>[/php]
Please enclose any code within the proper code tags. See the Posting Guidelines on how to do that. - moderator
Comment