Once logged in how to display username or first or last name php?
<p>I'm making a login system and I'm trying to make it once the user is logged in it will display the users username or first name. I figured out how to display the ID of the user but I want the username (uid is how I have it setup) or first name (first is how I have it set up). </p>

<pre><code>&lt;?php
if (isset($_SESSION['id'])) {
    echo $_SESSION['id'];
    echo "&lt;div class='welcome_login'&gt;&lt;h1&gt;Welcome! Thanks for logging in!!&lt;/h1&gt;&lt;/div&gt;";
} else {
    echo "&lt;div class='intro_page'&gt;&lt;h1&gt;You must login or signup!&lt;/h1&gt;&lt;/div&gt;";
}
?&gt;
</code></pre>