sonsukua
08-01-2007, 11:10 AM
i use this codes for encrypte my pages. but at some machines it doesn't work...
in username area adds automatically domain name :
for example user name is : subat when i write user name it adds automacilly
domainname.com/subat
What Should i do?
So Sorry for my poor english :(
<?
if (!isset($PHP_AUTH_USER)):
header('WWW-Authenticate: Basic realm="Enter Admin Password"');
header('HTTP/1.0 401 Unauthorized');
exit;
else:
include "config.php";
$result=mysql_query("Select * from us_table where uname= '$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'");
if (mysql_affected_rows() !=1) :
header('WWW-Authenticate: Basic realm="Enter Admin Password"');
header('HTTP/1.0 401 Unauthorized');
exit;
else:
$userid=mysql_result($result,0,'id');
endif;
endif;?>
in username area adds automatically domain name :
for example user name is : subat when i write user name it adds automacilly
domainname.com/subat
What Should i do?
So Sorry for my poor english :(
<?
if (!isset($PHP_AUTH_USER)):
header('WWW-Authenticate: Basic realm="Enter Admin Password"');
header('HTTP/1.0 401 Unauthorized');
exit;
else:
include "config.php";
$result=mysql_query("Select * from us_table where uname= '$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'");
if (mysql_affected_rows() !=1) :
header('WWW-Authenticate: Basic realm="Enter Admin Password"');
header('HTTP/1.0 401 Unauthorized');
exit;
else:
$userid=mysql_result($result,0,'id');
endif;
endif;?>