jameson9 Posted March 16, 2007 Share Posted March 16, 2007 Hi, newbie here so I will try and explain as best I can. I have a successful login and session created using PHP and MYSQL and now I would like to have the username appear at the top of the screen after successful login, and possibly, though not necessarily , throughout the entire user session until logout. Any suggestions as to the easiest, lightest weight and newbie friendly code to use? Thanks. Link to comment https://forums.phpfreaks.com/topic/43052-outputting-username-to-stay-at-top-of-page-throughout-user-session/ Share on other sites More sharing options...
per1os Posted March 16, 2007 Share Posted March 16, 2007 <?php session_start(); print $_SESSION['username']; ?> Link to comment https://forums.phpfreaks.com/topic/43052-outputting-username-to-stay-at-top-of-page-throughout-user-session/#findComment-209117 Share on other sites More sharing options...
interpim Posted March 16, 2007 Share Posted March 16, 2007 build a function to pull the username from the session variable then echo that... call teh function wherever you want the username displayed Link to comment https://forums.phpfreaks.com/topic/43052-outputting-username-to-stay-at-top-of-page-throughout-user-session/#findComment-209118 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.