----- Original Message -----
From: "Liam MacKenzie" <[EMAIL PROTECTED]>
To: "Hendråwan Rinäldi" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, August 30, 2002 4:49 PM
Subject: Re: [PHP] PHP_AUTH_USER


> I'm afraid you're going to have to be more specific than that my friend.
>

every body or my buddy Liam MacKenzie can help me??
this is the script....

what is the code for log out?????
thankssssssssssssssssss

:))))



 <?
if(!isset($PHP_AUTH_USER))

Header("WWW-authenticate: basic realm=\"Login Required\"");
Header("HTTP/1.0 401 Unauthorized");
$title="Login screen";
?>
Contact the webmaster
<?
exit;
} else

mysql_pconnect("host","user","password") or die("Unable to connect to SQL
server");
mysql_select_db("database_here") or die("Unable to select database");
$user_id=strtolower($PHP_AUTH_USER);
$password=$PHP_AUTH_PW;
$query = mysql_query("select * from users where username='$user_id' and
password=password('$password')");
if(!mysql_num_rows($query))

Header("WWW-authenticate: basic realm=\"Auth Required\"");
Header("HTTP/1.0 401 Unauthorized");
$title="Login Instructions";
 ?>
Username and Password are required to view this page.<br>
<br>
Contact the webmaster
<br>
<?
 exit;
  }
     }
 ?>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to