ownForm.php

Source of ownForm.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<title>ownForm.php</title>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
</head>
<body>
<?php
if (isset($_REQUEST["userName"])){
  $userName = $_REQUEST["userName"];
  print "<h1>Hi, $userName</h1>\n";
} else {
  print <<<HERE
  <form action = ""
        method = "post">
    <fieldset>
      <label>Name</label>
      <input type = "text"
             name = "userName">
      <button type = "submit">
        submit
      </button>
    </fieldset>
  </form>
HERE;
} // end if 

?>	
</body>
</html>