By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,713 Members | 1,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,713 IT Pros & Developers. It's quick & easy.

http user in php script

P: n/a
I once saw a code to show the username that logged in in a php script after
logging in with http authentification, I cant seem to find the code anywhere
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On 2005-04-09, aznFETISH <ne**@aznfetish.com> wrote:
I once saw a code to show the username that logged in in a php script
after logging in with http authentification, I cant seem to find the
code anywhere


Are you looking for this:

<http://dk.php.net/manual/en/reserved.variables.php#reserved.variables.server>

Check 'PHP_AUTH_USER'.

--
Cheers
- Jacob Atzen
Jul 17 '05 #2

P: n/a
I try this
<?PHP
$username=$_SERVER['PHP_AUTH_USER'];
echo "$username";
?>
but it shows nothing

"aznFETISH" <ne**@aznfetish.com> wrote in message
news:z5******************@tornado.tampabay.rr.com. ..
I once saw a code to show the username that logged in in a php script after
logging in with http authentification, I cant seem to find the code
anywhere

Jul 17 '05 #3

P: n/a
On 2005-04-09, aznFETISH <ne**@aznfetish.com> wrote:
I try this
<?PHP
$username=$_SERVER['PHP_AUTH_USER'];
echo "$username";
?>
but it shows nothing


Weird, it works fine here. Try var_dump($_SERVER) and see what you can
find.

--
Cheers
- Jacob Atzen
Jul 17 '05 #4

P: n/a
ok thanks, it shows that should use
$_SERVER['REMOTE_USER'];
"Jacob Atzen" <ja***@aub.dk> wrote in message
news:sl*******************@tank.aub.dk...
On 2005-04-09, aznFETISH <ne**@aznfetish.com> wrote:
I try this
<?PHP
$username=$_SERVER['PHP_AUTH_USER'];
echo "$username";
?>
but it shows nothing


Weird, it works fine here. Try var_dump($_SERVER) and see what you can
find.

--
Cheers
- Jacob Atzen

Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.