<html>
<! SignOn.php                                                 >
<! Chapter 11, Oracle Database XE PHP Web Programming         >
<! by Michael McLaughlin                                      >
<!                                                            >
<! This demonstrates an application sign on form using        >
<! sessions.                                                  >
<head>
<title>
  Chapter 12 : 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
  // Display login user form.
  signOnForm();

  // Build dynamic data entry form.
  function signOnForm()
  {
    // Initialize return variable.
    $out  = '<div id=centered>';

    // Set and append next form target file.
    $out .= '<form method="post" action="AddUser.php">';

    // Append balance of form header.
    $out .= '<table border="4"
                    bgcolor="beige"
                    bordercolor="silver"
                    cellspacing="0">';
    $out .= '<tr><td align="center" width="400">';
    $out .= '<font size=+3>User Login</font>';
    $out .= '</td></tr>';
    $out .= '<tr><td>';
    $out .= '<table border="0" cellpadding="5" cellspacing="0">';
    $out .= '<tr>';
    $out .= '<td align="right" width="200">User ID:</td>';
    $out .= '<td width="200"><input name="userid" type="text"></td>';
    $out .= '</tr>';
    $out .= '<tr>';
    $out .= '<td align="right">User Password:</td>';
    $out .= '<td><input name="passwd" type="password"></td>';
    $out .= '</tr>';
    $out .= '<tr>';
    $out .= '</table>';
    $out .= '</td></tr>';
    $out .= '<tr><td align="center" colspan="2">';
    $out .= '<table border="0" cellpadding="5" cellspacing="0">';
    $out .= '<tr>';
    $out .= '<td align="center" valign="center">';
    $out .= '<input name="submit" type="submit" value="Login">';
    $out .= '</td>';
    $out .= '</tr>';
    $out .= '</table>';
    $out .= '</td></tr>';
    $out .= '</table>';
    $out .= '</form>';
    $out .= '</div>';

    // Return the form for rendering in a web page.
    print $out;
  }
?>
</body>
</html>