Authorization script

From: Date: Sat, 05 Jul 2003 12:51:01 +0000
Subject: Authorization script
Groups: php.general 
Request: Send a blank email to php-general+get-154046@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: <?php require_once('config.inc.php'); $authorized = 0; $getUser = $_SERVER['PHP_AUTH_USER']; $getPass = $_SERVER['PHP_AUTH_PW']; if (($getUser == $user) && ($getPass == $pass)) { $authorized = 1; } 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; } ?> The problem is that if a user clicks cancel the control panel loads instead of the program dying. Why and how do I stop it? Thank you, -- Kyle

« previous php.general (#154046) next »