Topic: Fetching user ID number.
Hi guys, I just want to simply create a link at the top of the page where it says "Logged in as blah blah". I want the URL to be the users name and when clicked I want the link to take the user to their profile to edit and what not. But, I don't know how to fetch the user id from the database.
I see in header.php this is where I have to do it:
$tpl_temp = '<div id="brdwelcome" class="inbox">'."\n\t\t\t".'<ul class="conl">'."\n\t\t\t\t".'<li>'.$lang_common['Logged in as'].' <strong>'.pun_htmlspecialchars($pun_user['username']).'</strong></li>'."\n\t\t\t\t".'<li>'.$lang_common['Last visit'].': '.format_time($pun_user['last_visit']).'</li>';
I'm guessing I'd have to create the url around the $pun_user part so it would be like:
$tpl_temp = '<div id="brdwelcome" class="inbox">'."\n\t\t\t".'<ul class="conl">'."\n\t\t\t\t".'<li>'.$lang_common['Logged in as'].' <strong><a href="/profile.php?id=ID NUMBER HERE"> '.pun_htmlspecialchars($pun_user['username']).' </a></strong></li>'."\n\t\t\t\t".'<li>'.$lang_common['Last visit'].': '.format_time($pun_user['last_visit']).'</li>';
Thanks in advance for help guys.
ricketh.