<!--
    Brian Platz
    CS85 Section 1643
    Professor Geddes
    March 12, 2012
    Assignment:  Create a page, call it pageGeneratorForm.html, with a form containing fields for 
                caption, background color, font color, and body. When the form is submitted, 
                a PHP script, call it generatePage.php, should run. It should create HTML elements 
                for the title, top level heading, and body using values from the form. 
                The script should also set CSS properties for the background color and font color 
                of the text using values from the form.
    --> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="brianplatz.com" xml:lang="en">
      <?php
          $title 
filter_input(INPUT_GET"title");
          
$heading filter_input(INPUT_GET"heading");
          
$bgcolor filter_input(INPUT_GET"bgcolor");
          
$textcolor filter_input(INPUT_GET"textcolor");
          
$text filter_input(INPUT_GET"text");
          print <<<HERE
              <head>
                 <title>
$title</title>
                 <style>
                 body {background-color:
$bgcolor}
                 h1 {color:
$textcolor; font-family:Ariel; font-size:24pt; font-weight:bold}
                 p  {color:
$textcolor; font-family:Ariel; font-size:14pt; font-weight:normal}
               </style>
            </head>
            <body>
                 <h1>
$heading</h1>
                 <p>
$text</p>
              </body> 
HERE;
        echo 
"<a href='../index.html' >Return to Index</a>";
      
?>
</html>