simple answer dont use .htaccess. anser your looking for, keep the username / password
the same as your login as htaccess and use php's http authentication to login the
first time.
<?
include_once('cookie.egn');
include_once('database.egn');
function bad_passwd()
{
echo "You have entered an invalid password.<br>\n";
exit();
}
if ( isset($PHP_AUTH_USER) AND isset($PHP_AUTH_PW) AND $peop_r =
fetch_db_value('people_manager', "WHERE username = '$PHP_AUTH_USER' AND password =
'$PHP_AUTH_PW' ") )
$SessionID = $peop_r['peopleID'];
else
{
Header("WWW-Authenticate: Basic realm='$SERVER_NAME' ");
Header("HTTP/1.0 401 Unauthorized");
bad_passwd();
}
?>
--
Chris Lee
[EMAIL PROTECTED]
"Holger Rothaug" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi!
I want to have an own user authentification based on a mysql-DB connect.
Afterwards I link the user to the specific directory, the user has been
authentified for.
This user-specific directory is secured by an .htaccess file and therefor a
authentification window sent by the web server pops up to ask for the login
again.
Is there a way to prevent the 2. window to appear? Can I set the environment
variables manually after my own (first) user authetification?
Any help is appreciated.
Holger
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]