<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
yet-more-refactored demo of form validation using
JavaScript;
now doing so from a "master" PHP controlling a multi-screen
(albeit only 2) screen situation
by: Sharon Tuttle
last modified: 2016-04-21
-->
<head>
<title> refactored-again JavaScript form validation </title>
<meta charset="utf-8" />
<?php
require_once("make_three_value_form.php");
require_once("make_three_value_response.php");
?>
<link href="http://users.humboldt.edu/smtuttle/styles/normalize.css"
type="text/css" rel="stylesheet" />
<link href="three-value-form.css"
type="text/css" rel="stylesheet" />
<script src="three-value.js" type="text/javascript">
</script>
</head>
<body>
<?php
// assuming that, if the first textfield's name is not
// in the $_GET array, should display that form
// [yes, we actually DID use method="get" in original! 8-) ]
if (! array_key_exists("first", $_GET))
{
make_three_value_form();
}
// ...but if it IS, should display form-response instead
else
{
make_three_value_response();
}
require_once("328footer-better.html");
?>
</body>
</html>