Re: Own User authentification

From: Date: Thu, 15 Mar 2001 15:57:51 +0000
Subject: Re: Own User authentification
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-44083@lists.php.net to get a copy of this message
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 lee@mediawaveonline.com "Holger Rothaug" <rothaug@HS.TECMATH.com> wrote in message news:713486B4F60AD4119227000102053110439CDD@exchange01.humanmodeling.tecmath.de... 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: 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

« previous php.general (#44083) next »