homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

how to display logged in username on a page

 5:55 pm on May 2, 2007 (gmt 0)

lets say that i want to show on my exclusive page "hello,_________"you are now logged in.
I have been serching but so far no luck, maybe the answer is simple, I have no idea.I have the sessions variable up already but that small piece of code is missing to complete the page.
thanks again! This is a great forum.



 5:59 pm on May 2, 2007 (gmt 0)

Welcome to WebmasterWorld fatthumb,

usually when the user logs in the username is put into a session or cookie, the username can then be echo'ed from there


 6:25 pm on May 2, 2007 (gmt 0)

Yes, session or cookie. We have a thread in our library that shows how the session is set after a successful login, and how you could use it on other pages: [webmasterworld.com...]


 1:16 am on May 6, 2007 (gmt 0)

Hello fatthumb,

I use this ...
$_SESSION['last_url'] = $_SERVER['REQUEST_URI'];
echo "Hello " . $usr;


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved