Re: sessions and REMOTE_USER
| From: | Renze Munnik | Date: | Thu, 29 Mar 2001 13:31:24 +0000 |
| Subject: | Re: sessions and REMOTE_USER | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46083@lists.php.net to get a copy of this message | ||
Well, try this:
$REMOTE_USER
or
$PHP_AUTH_USER
or
$HTTP_SERVER_VARS["REMOTE_USER"]
or
$HTTP_SERVER_VARS["PHP_AUTH_USER"]
or
$HTTP_SERVER_VARS{"PHP_AUTH_USER"}
or
$HTTP_SERVER_VARS{"REMOTE_USER"}
...make your choice...
RenzE
Rahul Bhide wrote:
>
> Gurus,
> I am a relative newbie to sessions in php.
>
> Question: How can I get the loginname of the user . Can session and
> session variables get this??. Another way I have tried(but
> unsuccessfully !!) is to have a .htaccess file in the directory . Once
> the user logs in I use the following code to get his login name in a
> variable.
>
> <?php
> $f=getenv("REMOTE_USER");
> print "$f";
> ?>
>
> but on execution nothing gets printed.
>
> Any solutions ??
>
> thanks in advance,
> ~Rahul
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net