RE: [PHP] Authenticate an user: Help!!!
| From: | Dimitris Kossikidis | Date: | Wed, 07 Nov 2001 08:10:43 +0000 |
| Subject: | RE: [PHP] Authenticate an user: Help!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73684@lists.php.net to get a copy of this message | ||
You have forgot this character in line 6 ";" .
The other way to authenticate users is sessions or cookies. Just
validate usernames and password given in html forms, with mysql or files
or .htpasswd file or whatever.
> -----Original Message-----
> From: Mercedes [mailto:mercedes@visualsies.com]
> Sent: Wednesday, November 07, 2001 8:42 PM
> To: php-general@lists.php.net
> Subject: [PHP] Authenticate an user: Help!!!
>
>
> 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
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net To contact the list
> administrators, e-mail: php-list-admin@lists.php.net
>
>