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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
--------------------------------------
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
--------------------------------------



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to