Re: Authorization script

From: Date: Sat, 05 Jul 2003 13:02:02 +0000
Subject: Re: Authorization script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-154048@lists.php.net to get a copy of this message
> I am making an authorizatoin script for the control panel of a loggin > system I have been writing. Here is what I have right now: Well, if you copied and paste'd this, then I'm surprised that you don't get a syntax error.... > if (!$authorized) { > header('Cache-Control: no-store, no-cache, must-revalidate'); > header('Cache-Control: post-check=0; pre-check=0', false); > header('Pragma: no-cache'); > header('WWW-Authenticate: Basic realm="phpLogK"'); > exit; ^^^^^^^^^^^ exit(); You also need some more headers... header('HTTP/1.0 401 Unauthorized'); header('status: 401 Unauthorized'); -=- me

« previous php.general (#154048) next »