Authenticate an user: Help!!!
| From: | Mercedes | Date: | Wed, 07 Nov 2001 18:41:43 +0000 |
| Subject: | Authenticate an user: Help!!! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-73632@lists.php.net to get a copy of this message | ||
I'm trying to authenticate an user and I use the following source code:
<?
if(!isset($PHP_AUTH_USER)){
Header("WWW-Authenticate: Basic realm=\$quot;mi Realm\"");
Header("HTTP/1.0 401 Unauthorized")
echo "TeXto para enviar si se utiliza el botón de Cancelar";
exit;
}else{
echo " Hola $PHP_AUTH_USER <p>";
echo " Tu contraseña es $PHP_AUTH_PW <p>";
}
?>
but it says: Parse error on line 6. I thing I have PHP like a CGI instead
like a module, but I don´t really know. How can I know this? And how can I
validate an user if using CGI mode?. Thanks
aviana@wanadoo.es