My site is almost finished and, I'm a little new at php but I would like to know how to display a users username on my web site after logging in.
Thanks for the help,
...:::ONE:::...
Printable View
My site is almost finished and, I'm a little new at php but I would like to know how to display a users username on my web site after logging in.
Thanks for the help,
...:::ONE:::...
One would usually use echo to display a username. What problem are you having exactly, why can't you display the username?
echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
or
echo "Hello " . $_SERVER['PHP_AUTH_USER'];
I tried using echo before and it didn't work, but now for some reason it does.
Thanks Alot,
...:::ONE:::...