<html>
<! SignOn.php                                                 >
<! Chapter 11, Oracle Database XE PHP Web Programming         >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This script demonstrates basic HTTP authentication sign on >
<! program, which uses two library files - one for the basic  >
<! operation functions and the other for the form master. It  >
<! uses a default addUserForm for illustration.
<head>
<title>
  Chapter 11 : SignOn.php
</title>
<style type="text/css">
  div#centered {border:0;height:50%;top:25%;left:25%;width:50%;
                position:absolute;}
</style>
</head>
<body>
<?php
  // Include form library.
  @include_once("BasicAuthentication.inc");
  @include_once("BasicForms.inc");

  // Check valid credentials.
  $valid_user = verify_authentication();

  //Prompt for credentials when they're missing.
  if (!$valid_user)
  {
    authenticate();
  }
  else
  {
    // Assign inputs to variables.
    $userid = isset($_POST['userid']);
    $passwd = isset($_POST['passwd']);

    // Display next user form.
    addUserForm(array("form"=>"AddUser.php"
	                 ,"userid"=>$userid));
  }
?>
</body>
</html>