Correct paragraph and if conditions spacing

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@65963 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Gabor Hojtsy 2001-12-22 16:28:34 +00:00
parent 327a552b9b
commit 09a7562e5a

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.19 $ -->
<!-- $Revision: 1.20 $ -->
<chapter id="features.http-auth">
<title>HTTP authentication with PHP</title>
@ -25,7 +25,7 @@
<programlisting role="php">
<![CDATA[
<?php
if(!isset($PHP_AUTH_USER)) {
if (!isset($PHP_AUTH_USER)) {
header("WWW-Authenticate: Basic realm=\"My Realm\"");
header("HTTP/1.0 401 Unauthorized");
echo "Text to send if user hits Cancel button\n";
@ -104,13 +104,13 @@
exit;
}
if(!isset($PHP_AUTH_USER) || ($SeenBefore == 1 && !strcmp($OldAuth, $PHP_AUTH_USER)) ) {
if (!isset($PHP_AUTH_USER) || ($SeenBefore == 1 && !strcmp($OldAuth, $PHP_AUTH_USER))) {
authenticate();
}
else {
echo "</p>Welcome: $PHP_AUTH_USER<br>";
echo "<p>Welcome: $PHP_AUTH_USER<br>";
echo "Old: $OldAuth";
echo "<form action='$PHP_SELF' METHOD=POST>\n";
echo "<form action='$PHP_SELF' METHOD='POST'>\n";
echo "<input type='hidden' name='SeenBefore' value='1'>\n";
echo "<input type='hidden' name='OldAuth' value='$PHP_AUTH_USER'>\n";
echo "<input type='submit' value='Re Authenticate'>\n";