Hello,
I'm really stumped.
I have used login many times and it has worked.
This is what I have (in password.php):
"function authenticate(){
Header("Cache-Control: no-cache, must-revalidate");
Header("Pragma: no-cache");
Header("WWW-authenticate: basic realm=\"Administrors' Zone\"");
//, Cache-Control: no-cache
Header("HTTP/1.0 401 Unauthorized");
echo "Please contact <a href=mailto:support@itsport.com>support@itsport.com</a> if you forgot your user id and password.";
exit;
}
if(!$PHP_AUTH_USER){
authenticate();
}
else{
// query to get info
}
So I have this code, and it works in my other files, as soon as I call my reportingTool.php there is a line to include that password file:
require ("password.php");
It will get to that file, but it does not prompt me for my username and password.... Why is that? It automatically goes here in the code:
if(!$PHP_AUTH_USER){
authenticate();
}
which then stops my program from running... I believe i need the login box to pop up and ask me for the username and password.
This happens in all my other scripts except this one...
Sometime it will work, and prompt me for the username and password, and other times it will not work.
It also give me the error
"Warning: Cannot add header information - headers already sent by (output started at /root2/www/sports/alms/web/reports/reportingTool.php:3) in /root2/www/sports/alms/web/reports/password.php on line 5
Warning: Cannot add header information - headers already sent by (output started at /root2/www/sports/alms/web/reports/reportingTool.php:3) in /root2/www/sports/alms/web/reports/password.php on line 6
Warning: Cannot add header information - headers already sent by (output started at /root2/www/sports/alms/web/reports/reportingTool.php:3) in /root2/www/sports/alms/web/reports/password.php on line 7
Warning: Cannot add header information - headers already sent by (output started at /root2/www/sports/alms/web/reports/reportingTool.php:3) in /root2/www/sports/alms/web/reports/password.php on line 9
Please contact support@itsportsnet.com if you forgot your user id and password."
Any help is greatly appreciated. Thanks for your time.