Anyone know why a simple auth.inc script which is included on all pages under the root directory it sits in. It sits in that top directory along with the index.php for that part of the site...all other fields you access from that index are in directories below that. When linking to index.php it asks for the usenrmae & password checks it against database now they should be stored in $PHP_AUTH_USER and $PHP_AUTH_PASS right.... well if you click on a link from index.php to a file in a directory below it pulls up the headers again as if PHP_AUTH_USER etc.. has been unset again. After youve entered it again and you click to other parts its all fine. Anyone got any ideas how to get rid of this annoying problem?? Cheers,
Towner
Don't entangle your custom code with HTTP BASIC authentication. Make a decision on whether to use HTTP BASIC, or your own database, and stick with it.
Read Tim Perdue's column about authenticating users with PHP.