Tried the code below but this doesn't work. I have declared the session as ($_SESSION['username'] = true;) - this code is in my check-login before everything else. Please note that this works for stopping people accessing pages without logging in but wont let me do a simple thing like echo a logged in username. Thank you in advance.
Code that I have tried
<?php $username = $_SESSION['username']; ?>