Re: login without database
| From: | Romeo Manzur | Date: | Fri, 30 Mar 2001 16:31:40 +0000 |
| Subject: | Re: login without database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46344@lists.php.net to get a copy of this message | ||
You can do this:
require('acces.inc.php');
if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $st_LOGIN) && (
$PHP_AUTH_PW == "$st_PASSWORD" )) ) {
header("WWW-Authenticate: Basic entrer=\"Admin Basta\"");
header("HTTP/1.0 401 Unauthorized");
echo "Access in-autorizado...";
exit;
}
where access.inc.php has the variables $st_LOGIN and st_PASSWORDS for
authenticate you login, you have to put this code before the <html> tag...
luck...
Jan Grafström wrote:
> Hi!
> Can I use php to make a login system for users? I don´t have a databas
> on my server. I only want to have a few users. When I send variables to
> php the string is always cached by IE5.5 and it´s very easy to se the
> username and password if you look i cache. Is there a way to get this
> done only on the server?
>
> --
> 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
--
--------------------------------------
Romeo Manzur
Web Application Developer
iSilicom
Av. 27 de Febrero 904-A Desp 1, Centro
C.P.:86000
Villahermosa, Tabasco, Mexico
Tel.:(52)(9)3-12-4790
--------------------------------------