index.xhtml


<?php
  header("Vary: Accept");
  if (array_key_exists("HTTP_ACCEPT", $_SERVER) &&
      stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml") ||
      stristr($_SERVER["HTTP_USER_AGENT"], "W3C_Validator")
      )
  {
    header("Content-type: application/xhtml+xml");
    print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
  }
  else
  {
    header("Content-type: text/html; charset=utf-8");
  }
 ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
                      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <title>Log In Here!</title>
    <script type="text/javascript" src="scripts/core.js"></script>
    <script type="text/javascript" src="scripts/form_handler.js"></script>
    <link rel="stylesheet" type="text/css" href="css/form_handler.css" />
  </head>
  <body>
    <h1>Log In Here!</h1>
      <form method="get" action="scripts/login.php">
      <fieldset>
        <legend>Login</legend>
<div>
        <label for="user-text">User:</label>
        <input type="text" id="user-text" name="user-text" />
        <span class="error-message not-shown">You idiot!</span>
</div>
<div>
        <label for="passwd">Password:</label>
        <input type="password" id="passwd" name="user-passwd" />
        <span class="error-message not-shown">Your really stupid idiot!</span>
</div>
        <input type="submit" value="Log In" />
      </fieldset>
      </form>
    <p>
      Last updated <?php echo date("Y-m-d", filemtime($_SERVER['SCRIPT_FILENAME']))."\n"; ?>
      <a href="http://validator.w3.org/check?uri=referer">XHTML</a>
      <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>
    </p>
  </body>
</html>