[Chameleon] Authorization in Chameleon
joanvp
joanvp at yahoo.com
Thu Oct 28 12:32:23 EDT 2004
I want to insert a simple password in chameleon. As
I'm newby in PHP, I've tried a simple script browsing
on the net:
----------
$username = "usu";
$pwd = "password";
if(!isset($PHP_AUTH_USER)) {
Header("WWW-Authenticate: Basic realm=\"Zona
protegida\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Imposibile ejecutar la autorización\n";
exit;
} else {
if (($PHP_AUTH_USER == $username) && ($PHP_AUTH_PW ==
$pwd)) {
echo "Autorización ejecutada para $username.";
} else { echo "Autorización fracasada.";}
}
----------
I inserted it in index.phtml on chameleon application
It shows a form with two inputs. But when I enter my
username and password it doesn't work.
Someone can help me?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Chameleon
mailing list