Cloughie
06-21-2007, 03:04 PM
Hi,
I was using the following code to restrict access to a page:
//start of auth check code
if( ( !isset( $_SERVER["PHP_AUTH_USER"] ) ) || ( !isset(
$_SERVER["PHP_AUTH_PW"] ) ) ||
( $_SERVER["PHP_AUTH_USER"] != "pass" ) || (
$_SERVER["PHP_AUTH_PW"] != "pass" ) )
{
header( 'WWW-Authenticate: Basic realm="Fat Loss Stack customers only - Please enter username and password emailed to you shortly after ordering the fat loss stack."' );
header( "HTTP/1.1 401 Unauthorized" );
print( "You are not authorised to view this page."
);
exit();
}
//end of auth check code
It seems to have stop working now though?
How else can I restrict access to a page? Its not massively secure information, just something simple.
I was using the following code to restrict access to a page:
//start of auth check code
if( ( !isset( $_SERVER["PHP_AUTH_USER"] ) ) || ( !isset(
$_SERVER["PHP_AUTH_PW"] ) ) ||
( $_SERVER["PHP_AUTH_USER"] != "pass" ) || (
$_SERVER["PHP_AUTH_PW"] != "pass" ) )
{
header( 'WWW-Authenticate: Basic realm="Fat Loss Stack customers only - Please enter username and password emailed to you shortly after ordering the fat loss stack."' );
header( "HTTP/1.1 401 Unauthorized" );
print( "You are not authorised to view this page."
);
exit();
}
//end of auth check code
It seems to have stop working now though?
How else can I restrict access to a page? Its not massively secure information, just something simple.