Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Accredited PayPal World Seller
how to display logged in username on a page fatthumb msg:3328894 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.
jatar_k msg:3328906 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
eelixduppy msg:3328937 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 calvinmicklefinger msg:3331893 1:16 am on May 6, 2007 (gmt 0)
I use this ...
<?php session_start(); $_SESSION['last_url'] = $_SERVER['REQUEST_URI']; ?> <html> <head> </head> <body> <?php $usr = $_SERVER['PHP_AUTH_USER']; echo "Hello " . $usr; ?>