Page 1 of 1

Using htaccess username in php

Posted: Sun Jan 02, 2005 12:36 am
by doubleohseven
Hi,

In the Simple News tutorial, it mentions there is a way to save the username from the htaccess protected files and use that as the author. Just wondering if anyone could show me how to do this, or direct me to a tutorial or post somewhere. Thanks!

Posted: Mon Jan 03, 2005 12:49 am
by AGISB
There is no way to read the password of a .htaccess access window. The username however you can get using

Code: Select all

<?php
$_SERVER['REMOTE_USER']
?>

Posted: Mon Jan 03, 2005 12:51 am
by doubleohseven
ah yess... that's all I wanted... all I wanted was for my site to automatically enter the username into MySQL for the purpose of signing the news, instead of adding it in manually each time. Thanks a lot!