$documentLocation = $_SERVER['PHP_SELF']; if ( $_SERVER['QUERY_STRING'] ) { $documentLocation = "checkLogin.php" . $_SERVER['QUERY_STRING']; } ?>