Something very strange is happening. I am using sessions on my wordpress website and for some reason, a session stays active until I update the page in the Wordpress website.
I have build a template for a login page and a page that will be reached after succesfully logging in. The following occurs:
How is this possible? Why is the session information of one user stored on the page for everyone to see? And why does it only disappear when I update the page in the Wordpress dashboard?
If it would help, I can post my code.
code of secured page:
<div id="primary">
<div id="content" role="main">
<?php
session_start();
$periodarray = array('januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december');
if(date("d") > 10){$maand1 = date("m");}else{$maand1 = date("m") - 1;}
if(isset($_GET['periode'])){$periode = $_GET['periode'];}else{$periode=$periodarray[$maand1-1];}
if(isset($_GET['jaar'])){$jaar = $_GET['jaar'];}else{$jaar = date("Y");}
if(isset($_SESSION['rhptarief'])){$rhptarief = $_SESSION['rhptarief'];}
if (isset($_SESSION['username']))
{
$hdmsg = "Welkom ".$_SESSION['name'];?><body>
<?php }else{?>
<body>
<div>
U bent niet ingelogd.
<input type="button" style="background-color:#F90;" value="Inloggen" onClick="LogIn()">
</div>
</body>
<?php } ?>
</div><!-- #content -->
</div><!-- #primary -->
Edit: It only seems to be happening with Internet Explorer (I use 11) and not with Google Chrome.