login page + .htaccess

From: Date: Fri, 23 Aug 2002 11:08:56 +0000
Subject: login page + .htaccess
Groups: php.general 
Request: Send a blank email to php-general+get-113739@lists.php.net to get a copy of this message
Hi all, I have this situation, One on my directory is protected by .htaccess file, it use only one pair of username and password. I also have a login page to maintain a list of members who logged in my site. I want to do this: If the user is not logged in and try to access the protected directory, it pop up a window and ask for the password (done by htaccess). Once a user is logged in and access the directory, it bypass the popup windows Can i do it with this code? i tried but not works if ($_SESSION['logged']){ $_SERVER['PHP_AUTH_USER']="username"; $_SERVER['PHP_AUTH_PW']="password"; }

« previous php.general (#113739) next »