Hi there guys, how is everyone today?
I am having a minor issue with a session. I have a database I am working on that, of course, carries across multiple pages. The problem I am having is with the display of the logged in user's username, i.e. 'Welcome (username)!, Logout' This works fine upon the initial log in, but once I execute a different page (where the username is not displayed) and am re-directed back to the original page where the username is displayed, it seems to not show up, i.e. 'Welcome (blank space)!, Logout' I have tried a few things but I can't seem to resolve this minor issue. I do appreciate your help ahead of time, thanks!
I have posted my session code below, this is the exact session code that starts each of the pages that I need to carry the data across.
<?php
session_start();
$username = $_POST['username']; //Username
if (!isset($_SESSION['username'])) {
exit();
}
?>
Thank you for your help guys!!!