You can store the name inside a session variable.
To use session variables, all your (PHP) pages must begin with the
session_start() statement. This way, the server will know you are using a session to store such variables.
Once the session is declared, you can store and recall the session variables in a way similar to regular variables.
Here's an example:
session_start();
$_SESSION['name'] = 'John Doe';
echo $_SESSION['name'];
So as long as you declare your
session_start() at the beginning of each page, your session variables will be available to use.
At log-off, you can use
session_destroy() to ensure the session "memory" is erased from the server.